Last active
July 4, 2018 20:22
-
-
Save TheLie0/451ad81a40bedf549a4f05887132a9c1 to your computer and use it in GitHub Desktop.
A brainfuck stack/heap memory emulator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ | |
[ | |
>[<] | |
<[>,>]< | |
[ | |
-----------------------------------------------------------> check if char is a semicolon | |
]< | |
[ | |
+++++++++++ if its not a semicolon convert it into a number | |
>> | |
] | |
<< | |
] | |
] puts in numerical inout as numbers in memory | |
>>>>>>->[>] rectifies the weirdness of the above function | |
-[<]> | |
[>+[-<<]>[->++++++++++<]>] adds the decimals together to represent the input in one cell | |
<< rectifies the weirdness of the above function | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment