A simple asm-like language with advanced features.
Read a string from Standard Input to the specified register, with the prompt specified
Syntax: in [prompt string] [register]
Example: in $PROMPT $asn
Print a String, Int or register to Standard Output
Syntax: out [register, string, int]
Example: out $RESULT
Store the specified value in the specified register
Syntax: mov[value] [register]
Example: mov 5 $ADD
Note: Register name should be CAPS, and begin with $
Add the first and second registers, and store it in the third register
Syntax: add [int or register] [int or register] [register]
Example: add 5 5 $RESULT
Subtract the first and second registers, and store the result in the third register
Syntax: sub [int or register] [int or register] [register]
Example sub 7 5 $RESULT
Mulitply the first and second registers, and store the result in the third register
Syntax: times [int or register] [int or register] [register]
Example: times 7 6 $RESULT
Divied the first and second registers, and store the result in the third register
Syntax: div [int or register] [int or register] [register]
Example: div 47 6 $RESULT
Goto the specified label
Syntax: goto [label]
Example: goto .MAIN
If the two specified terms match, then goto the label. Else, continue
Syntax: if [register, string, int] (is) [register, string, int] (then) (goto) [label]*
*Terms in parenthesis optional, but recommended
Example: if 5 is $ANS then goto .YES
Stop execution
Syntax: end
Example: end
Print the raw content of the registers to Standard Output. Good for debugging
Syntax: dump
Example: dump
Joins two strings together, and stores the result in the third register Syntax: join [string] [string] [register] Example: join "Hi, " $NAME $RESPONSE
Converts the specified register to an int, and raises ConversionError if it fails Syntax: int [register] Example: int $INPUT
Converts the specified register to an string, and raises ConversionError if it fails Syntax: str [register] Example: str $INPUT
To make a label for a goto or if, just prefix it with a '.'
Syntax: .[label]
Example: .MAIN