255
Jump to navigation
Jump to search
- This is still a work in progress. It may be changed in the future.
255 is an esoteric programming language developed by User:AceKiron where operations are represented by a single byte. Currently available operators are:
Label | Hex | Description | Following parameters | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PUSH_N | 0x00 | Pushes the following N values onto the stack. | How many values to push onto the stack, after that follow the values. | ||||||||||||||
REVERSE_STACK | 0x01 | Reverses the stack. | |||||||||||||||
PRINT_N | 0x02 | Pops N values from the stack and prints them as characters. | How many characters to print. | ||||||||||||||
SET_MARK | 0x03 | Sets a mark that you can later go back to. | What number should be assigned to the mark. | ||||||||||||||
GOTO_MARK | 0x04 | Goes back to a previously set mark. | What number should be assigned to the mark. | ||||||||||||||
IF_N | 0x05 | Pops 1 value from the stack, if it's 0 it skips N amount of bytes. | How many bytes should be skipped if the statement is 0, after that follow the bytes for when it's anything else. | ||||||||||||||
DUPLICATE | 0x06 | Duplicates the top value on the stack. | |||||||||||||||
MATHS | 0x07 | Pops the top 2 values on the stack and pushes the output of a math operation with those 2 values onto the stack. |
|
||||||||||||||
PRINT_N_RAW | 0x08 | Pops N values from the stack and prints them raw (no converting to characters). | How many values to print. | ||||||||||||||
SWITCH_TOP | 0x09 | Switches the top value on the stack and the one below it from positions on the stack. |
Popular problems
Hello, world!
[0x00, 13, 'H', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '!', '\n', 0x01, 0x02, 13]
Truth-machine
The 3rd value here represents the input given to the truth machine.
[0x00, 1, 1, 0x05, 9, 0x03, 0, 0x00, 1, '1', 0x02, 1, 0x04, 0, 0x00, 1, '0', 0x02, 1, 0x08, ]
99 bottles of beer
[0x00, 1, 99, 0x03, 0, 0x06, 0x05, 139, 0x06, 0x08, 1, 0x00, 30, '\n', ',', 'l', 'l', 'a', 'w', ' ', 'e', 'h', 't', ' ', 'n', 'o', ' ', 'r', 'e', 'e', 'b', ' ', 'f', 'o', ' ', 's', 'e', 'l', 't', 't', 'o', 'b', ' ', 0x02, 30, 0x06, 0x08, 1, 0x00, 49, '\n', ',', 'd', 'n', 'u', 'o', 'r', 'a', ' ', 't', 'i', ' ', 's', 's', 'a', 'p', ' ', ',', 'n', 'w', 'o', 'd', ' ', 'e', 'n', 'o', ' ', 'e', 'k', 'a', 'T', '\n', '.', 'r', 'e', 'e', 'b', ' ', 'f', 'o', ' ', 's', 'e', 'l', 't', 't', 'o', 'b', ' ', 0x02, 49, 0x00, 1, 1, 0x01, 0x07, 0x01, 0x06, 0x08, 1, 0x00, 31, '\n', '\n', '.', 'l', 'l', 'a', 'w', ' ', 'e', 'h', 't', ' ', 'n', 'o', ' ', 'r', 'e', 'e', 'b', ' ', 'f', 'o', ' ', 's', 'e', 'l', 't', 't', 'o', 'b', ' ', 0x02, 31, 0x04, 0, 0x00, 31, '.', 'l', 'l', 'a', 'w', ' ', 'e', 'h', 't', ' ', 'n', 'o', ' ', 'r', 'e', 'e', 'b', ' ', 'f', 'o', ' ', 's', 'e', 'l', 't', 't', 'o', 'b', ' ', 'o', 'N', 0x02, 31]
Fibonacci sequence
[0x00, 6, 0, 1, '\n', 1, '\n', 0, 0x08, 1, 0x02, 1, 0x08, 1, 0x02, 1, 0x03, 0, 0x06, 0x01, 0x07, 0x00, 0x06, 0x08, 1, 0x00, 1, '\n', 0x02, 1, 0x04, 0]