Tiding up
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
# brainfuck-on-asm
|
# brainfuck-on-asm
|
||||||
|
|
||||||
My own brainfuck interpreter written in pure assembly and agony
|
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``
|
||||||
|
10
compile.sh
10
compile.sh
@@ -1,7 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
as *.s -o program.o
|
as *.s -o bf-cat.o
|
||||||
# ld program.o -g -o program debugging
|
ld bf-cat.o -N -o bf-cat
|
||||||
# ld program.o -N -s --strip-all --gc-sections -o program smallest
|
strip bf-cat
|
||||||
ld program.o -N -o program
|
echo "size =" $(wc -c bf-cat) "octets"
|
||||||
strip program
|
|
||||||
echo "size =" $(wc -c program) "octets"
|
|
||||||
|
6
debug.sh
6
debug.sh
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
as *.s -g -o program.o
|
as *.s -g -o bf-cat.o
|
||||||
ld program.o -g -o program
|
ld bf-cat.o -g -o bf-cat
|
||||||
gdb --args ./program $@
|
gdb --args ./bf-cat $@
|
||||||
|
1
test.bf
Normal file
1
test.bf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
|
Reference in New Issue
Block a user