Tiding up

This commit is contained in:
2025-06-21 16:34:17 +03:00
parent ea84361ca8
commit d3cb608a55
5 changed files with 15 additions and 11 deletions

View File

@@ -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``

View File

@@ -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"

View File

@@ -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
View File

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

View File

@@ -1 +0,0 @@
,+.......