summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorTyler Murphy <tylerm@tylerm.dev>2023-04-13 17:18:39 -0400
committerTyler Murphy <tylerm@tylerm.dev>2023-04-13 17:18:39 -0400
commitd425cc445b5ef05994f7b4759a66b57b9fb40501 (patch)
treedf5367d1b627766a7f566675be9ed680868919da /readme.md
parentbrainfucked (diff)
downloadbrainfucked-d425cc445b5ef05994f7b4759a66b57b9fb40501.tar.gz
brainfucked-d425cc445b5ef05994f7b4759a66b57b9fb40501.tar.bz2
brainfucked-d425cc445b5ef05994f7b4759a66b57b9fb40501.zip
readme
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md75
1 files changed, 75 insertions, 0 deletions
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..2d4c276
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,75 @@
+
+# Brainfucked
+
+Its brainfuck but with manual memory allocation :3
+
+All normal brainfuck is valid brainfucked. Though your tape only starts with as much memory that can hold a pointer. In other words, if you're on a 64 bit computer you get 8 cells, and if you're on a 32bit computer you get 4 cells.
+
+Pointers in brainfucked span as many cells as they are bytes.
+
+Just like brainfuck, cells wrap from 0 to 255, and vice versa, and also the tape wraps from front to end and end to front. The tape will not wrap though if you are inputting a string.
+
+## Commands
+
+`<` Move pointer left
+
+`>` Move pointer right
+
+`+` Increment cell by one
+
+`-` Decrement cell by one
+
+`[` Jump past the matching ] if the cell at the pointer is 0
+
+`]` Jump back to the matching [ if the cell at the pointer is nonzero
+
+`.` Output ascii at current cell
+
+`,` Input ascii into current cell
+
+`*` Allocate new tape size of current cell and replace with pointer
+
+`!` Free allocated pointer in current cell
+
+`(` Go to tape at pointer in current cell
+
+`)` Leave tape last entered
+
+`` ` `` Output null terminated string at current cell
+
+`~` Input string into current cells with max length in current cell
+
+`%` Clear screen
+
+`\` Comment out the rest of the line
+
+## Usage
+
+The `brainfucked` command expects only one argument which is the path to a file containing brainfucked.
+
+For example:
+```
+$ brainfucked helloworld.bfd
+```
+
+## License
+
+This project is Licensed under the [WTFPL](http://www.wtfpl.net/)
+
+## Compilation
+
+Brainfucked only runs on Linux systems because im too lazy to make other makefiles. Though it can compile if they are made.
+
+Make sure to have `gcc` and `make` installed, and then run
+
+```shell
+$ make # compiles the program
+$ sudo make install # installs the binary
+```
+
+If you wish to remove the program, you can run
+
+```shell
+$ sudo make uninstall # removes the binary
+```
+