aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-11-21 14:07:43 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-11-21 14:07:43 +0100
commit8c258327fe1c8f5038dcd0338c16c83767b97d1f (patch)
tree1fcdc5cfe551a93da6da087c83f33c938a90c7b2 /README.md
parent5677c3b8503292b02a516441ef9328b002142717 (diff)
downloadbfc-8c258327fe1c8f5038dcd0338c16c83767b97d1f.tar.gz
bfc-8c258327fe1c8f5038dcd0338c16c83767b97d1f.tar.bz2
bfc-8c258327fe1c8f5038dcd0338c16c83767b97d1f.zip
Added option to change buffer size, option to change buffer element sizeHEADmaster
Diffstat (limited to 'README.md')
-rw-r--r--README.md21
1 files changed, 13 insertions, 8 deletions
diff --git a/README.md b/README.md
index 433528c..8782815 100644
--- a/README.md
+++ b/README.md
@@ -6,17 +6,22 @@ Compiles [Brainfuck][1] to assembly and compile it to machine code with [`nasm`]
```
$ make
-$ ./bfc < ./brainfuck.bf > ./brainfuck.asm
-```
+$ ./bfc -h
+Usage: bfc [-h] [-S] [-o file] [-b buffer_len] [-e buffer_elem_bytes] [INPUT_FILE]
-You can then compile the assembly with the following:
+INPUT_FILE Brainfuck source (read stdin if not present)
-```
-$ nasm -f elf64 -o brainfuck.o brainfuck.asm
-$ ld -o brainfuck brainfuck.o
-```
+-h Print this message
+-S Output assembly instead of compiled executable
+-o Output filename ('-' for stdout)
+-b Length of the buffer available the program
+-e Number of bytes in each element of the program's buffer
+ (can only be: 1, 2, 4 or 8)
-Use `-f macho64` instead of `-f elf64` if you're on MacOS.
+$ ./bfc -o hello_world examples/hello_world.bf
+$ ./hello_world
+Hello World!
+```
## Examples