Add 1 to Cell #5 gives us an exclamation pointģ3 > ++. Subtract 3 from Cell #3 to get 101 which is 'e'Ģ7 +++++ ++. This program prints out the words Hello World!:ģ > ++++ Add 4 to Cell #1 this will always set Cell #1 to 4Ĥ [ as the cell will be cleared by the loopġ5 [ >. It is not known to what extent Müller was aware of or influenced by Böhm's language P′′ published in 1964, of which brainfuck can be considered a minor variation. ![]() Müller chose to name the language brainfuck (with the initial letter in lower case, although it is now often capitalised). The language was inspired by FALSE, which had a 1024-byte compiler. But, see extensions below.īrainfuck was invented by Urban Müller in 1993, in an attempt to make a language for which he could write the smallest possible compiler for the Amiga OS, version 2.0. <+-., should be considered comments and ignored. ![]() There is a pointer, initially pointing to the first memory cell. (In the original implementation, the array was 30,000 cells long, but this may not be part of the language specification different sizes for the array length and cell size give different variants of the language). 6 Constructing tape inscructions with Brainfuckīrainfuck operates on an array of memory cells, each initially set to zero.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |