Compare commits

...

4 Commits
v1.0 ... master

Author SHA1 Message Date
8f43012151
ex: show all printable ascii characters 2023-12-01 15:46:12 +01:00
15d997f592
Install in makefile 2023-12-01 14:07:33 +01:00
2d3efaf5e8
cat example 2023-12-01 13:55:14 +01:00
d083075003
Adding examples 2023-10-26 14:27:15 +02:00
7 changed files with 40 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,3 +1,2 @@
main
bff
*.o

3
Examples/allAscii.bf Normal file
View File

@ -0,0 +1,3 @@
+++++++++[>++++++++++<-]>+++++
>>+++[<++++++++++>-]<+++
<[>.+<-]

1
Examples/cat.bf Normal file
View File

@ -0,0 +1 @@
>,[>,]<[<]>[.>]

21
Examples/life.bf Normal file
View File

@ -0,0 +1,21 @@
>>>->+>+++++>(++++++++++)[[>>>+<<<-]>+++++>+>>+[<<+>>>>>+<<<-]<-]>>>>[
[>>>+>+<<<<-]+++>>+[<+>>>+>+<<<-]>>[>[[>>>+<<<-]<]<<++>+>>>>>>-]<-
]+++>+>[[-]<+<[>+++++++++++++++++<-]<+]>>[
[+++++++++.-------->>>]+[-<<<]>>>[>>,----------[>]<]<<[
<<<[
>--[<->>+>-<<-]<[[>>>]+>-[+>>+>-]+[<<<]<-]>++>[<+>-]
>[[>>>]+[<<<]>>>-]+[->>>]<-[++>]>[------<]>+++[<<<]>
]<
]>[
-[+>>+>-]+>>+>>>+>[<<<]>->+>[
>[->+>+++>>++[>>>]+++<<<++<<<++[>>>]>>>]<<<[>[>>>]+>>>]
<<<<<<<[<<++<+[-<<<+]->++>>>++>>>++<<<<]<<<+[-<<<+]+>->>->>
]<<+<<+<<<+<<-[+<+<<-]+<+[
->+>[-<-<<[<<<]>[>>[>>>]<<+<[<<<]>-]]
<[<[<[<<<]>+>>[>>>]<<-]<[<<<]]>>>->>>[>>>]+>
]>+[-<<[-]<]-[
[>>>]<[<<[<<<]>>>>>+>[>>>]<-]>>>[>[>>>]<<<<+>[<<<]>>-]>
]<<<<<<[---<-----[-[-[<->>+++<+++++++[-]]]]<+<+]>
]>>
]

View File

@ -1,15 +1,26 @@
.PHONY: clean, mrproper
.PHONY: clean, mrproper, uninstall, install
CC = gcc
CFLAGS = -g -Wall
LDFLAGS =
all: bff
PREFIX = /usr/local
%.o: %.c
all: bff
bff.o: bff.c
$(CC) $(CFLAGS) -c -o $@ $<
bff: main.o
bff: bff.o
$(CC) $(CFLAGS) -o $@ $+
install: bff
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f bff $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/bff
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/bff
clean:
rm -f *.o core.*

View File