diff --git a/README.md b/README.md index f108e68..f653e83 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ # brainfuck-on-asm -My own brainfuck interpreter written in pure assembly and agony \ No newline at end of file +My own brainfuck interpreter written in pure assembly and agony. + +# Compile +You will need GAS(or as)! Just run ``compile.sh`` then voila! + +# Running +``./bf-cat path/to/brainfuck-script`` diff --git a/compile.sh b/compile.sh index 9d88f07..3e99016 100755 --- a/compile.sh +++ b/compile.sh @@ -1,7 +1,5 @@ #!/bin/bash -as *.s -o program.o -# ld program.o -g -o program debugging -# ld program.o -N -s --strip-all --gc-sections -o program smallest -ld program.o -N -o program -strip program -echo "size =" $(wc -c program) "octets" +as *.s -o bf-cat.o +ld bf-cat.o -N -o bf-cat +strip bf-cat +echo "size =" $(wc -c bf-cat) "octets" diff --git a/debug.sh b/debug.sh index 4c1a3f1..04b1f67 100755 --- a/debug.sh +++ b/debug.sh @@ -1,4 +1,4 @@ #!/bin/bash -as *.s -g -o program.o -ld program.o -g -o program -gdb --args ./program $@ +as *.s -g -o bf-cat.o +ld bf-cat.o -g -o bf-cat +gdb --args ./bf-cat $@ diff --git a/test.bf b/test.bf new file mode 100644 index 0000000..8fa0f72 --- /dev/null +++ b/test.bf @@ -0,0 +1 @@ +++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++. diff --git a/test.txt b/test.txt deleted file mode 100644 index cd729e8..0000000 --- a/test.txt +++ /dev/null @@ -1 +0,0 @@ -,+.......