Variables a-z (.data segment) of size 1 word.
- var = const
- var = var + var
- var = var - var
- var = var * var
- var = var / var
- var = var % var
- var = var > var
- var = var => var
- var = var < var
- var = var =< var
- var = var == var
- var = var =! var
- var = var & var
- var = var | var
Support was added for constants in all of the binary expressions.
- :getchar(var)
- :putchar(var)
- :uchar(var) - putchar for stderr
- :raw(constant string)
- :throw(constant string) - raw for stderr
var is destination/source, always read stdin and write stdout. cstring is utility function that prints out a string constant.
- :if(var){} else{}
- :while(var){}
- :exit(var)
1st arg variable, 2nd arg index in memory (as if it was an array of words).
- :load(var,var)
- :store(var,var)
Definition
- :fun(name){}
Call
- :call(name)
: is at the beginning of all special functions, after which only the first character is checked (:call and :c behave the same).
Don't add extra spaces/characters inside keyword calls. Don't write an empty if block and an else in the same line. Closing brace and else must also be in the same line. If in doubt, check how its done in prev.p0. The syntax is not very robust, and that was kind of the point.