1# Language Notes
About
1# is a language used at Indiana University to teach Computability. It consists entirely of commands made up of 1's and #'s, designed to be simple to learn, and an effective tool in a text register machine.
Commands
| Add 1 to Rn |
1n# |
| Add # to Rn |
1n## |
| Go forward n lines |
1n### |
| Go backward n lines |
1n#### |
| Cases on Rn |
1n##### |
1n#
This command appends a 1 onto the Register given in unary before it. The Sanity version is
push1 'reg'.
1n##
This command appends a # onto the Register given in unary before it. The Sanity version is
push# 'reg'.
1n###
This command jumps forward a number of lines given in unary before it. In reality the program skips over n-1 lines, and executes the nth line. The Sanity version is
jump 'amt'.
1n####
This command jumps backward a number of lines given in unary before it. In reality the program skips over n-1 lines, and executes the nth line. The Sanity version is
jumpb 'amt'.
1n#####
This command cases on the Register given in unary before it. In order to case, the first character is popped off the Register, and compared against empty, 1, or #. The syntax is:
1##### ;Case on Register 1
<command in case of empty>
<command in case of '1'>
<command in case of '#'>
The Sanity version is
case 'reg'.
See Also
1# Program Formatter