123

From Esolang
Jump to: navigation, search

123 is an esoteric programming language created by David Catt (user:David.werecat) which further minimizes asdf.

Instructions

The pointer begins at location 0. The program is executed in a loop, and only terminates if the end of the program is reached and the pointer is below 0. All bits start at the value FALSE. Any unrecognizable characters are treated as NOPs.

Instruction Description
1 Flip the current bit and move the pointer left. If the pointer ends at location -4, the pointer is moved to location 0.
2 If the pointer is at location -3, read a character from the console and put it in locations 0 through 7; then move the pointer to location 0. If the pointer is at location -2, write a character to the console corresponding to locations 0 through 7; then move the pointer to location 0. At any other location, move the pointer right.
3 Specifies a jump symbol. If the pointer is below 0, do nothing. If the current bit is TRUE, skip back to either the previous jump symbol or the start of the program. If the current bit is FALSE, skip forward to either the next jump symbol or the end of the program.

Examples

Cat Program

111212112

External resources