Tiding up
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
# 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
|
||||
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"
|
||||
|
6
debug.sh
6
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 $@
|
||||
|
1
test.bf
Normal file
1
test.bf
Normal file
@@ -0,0 +1 @@
|
||||
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
|
Reference in New Issue
Block a user