BrainCrash

From Esolang
Jump to navigation Jump to search
Not to be confused with Braincrash, invented by User:TehZ.

BrainCrash is a Brainfuck derivative language designed by ぬこ, published in 2008. The purpose of the language is to make a "Hello, world!" program with zero-byte file.

Features

In addition to original 8 instructions, this language has 4 bitwise logical operation instructions and a special behaviour, which is executed when the program begins and ends.

Extended Instructions

Instructions Descriptions
| OR operation: Performs a bitwise OR operation on the byte at the pointer and the byte in storage, storing its result in the byte at the pointer. The pointer gets incremented.
& AND operation: Performs a bitwise AND operation on the byte at the pointer and the byte in storage, storing its result in the byte at the pointer. The pointer gets incremented.
~ NOT operation: Performs a bitwise NOT operation on the byte at the pointer.
^ XOR operation: Performs a bitwise XOR operation on the byte at the pointer and the byte in storage, storing its result in the byte at the pointer. The pointer gets incremented.

Special Behaviours

  • The first 13 memory cells are initialized with 72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, and 33 ("Hello, world!" in ASCII) respectively.
  • When the program ends, the pointer keeps being incremented until the value at the pointer is zero, outputting the currently pointed-to value. Therefore its behaviour can be expressed by the Brainfuck code [.>].

Examples

File
(empty)
Output
Hello, world!
File
|
Output
mllo, world!

External resources

Other implementations