Quudo
Jump to navigation
Jump to search
Quudo (KOO-do) is an esoteric programming language by SwitchU42 (talk) that is very similar to assembly. It has 16 syscall instructions that can be controlled with arguments specified with the "movargs" function which are all variable references.
Floats only exist when you print them because.
Comments are between the left brace / right curly brace '{' and the right brace / right curly brace '}'
Syscall commands
Note: these commands are the "syscallid" of the call function and the arguments (in the parenthesis) are provided by "movargs"
- print string/integer (data)
- receive input from stdin (data)
- exit program (code)
- add number (addend, addend, resultvar)
- subtract number (num1, num2, resultvar)
- multiply number (num1, num2, resultvar)
- divide number (num1, num2, resultvar)
- equals (first, second, resultvar)
- not equals (first, second, resultvar)
- greater than (first, second, resultvar)
- less than (first, second, resultvar)
- read file (filename, resultvar)
- write file (filename, datatowrite)
- delete file (filename)
- generate random number (remainder)
- system command (systemcmd)
- print ASCII character (char)
- logical and (op1, op2, res)
- logical not (op1, op2, res)
Functions
- call (syscallid)
- movargs (...args)
- run () runs the syscall
- rlab (labelid, condition) runs the "labelid" label. only runs the label if the condition argument is equal to 1
Declarations
label (id) [ functions ]
{example label} &("Hello world!") &(1) {ALWAYS true} label 1 [ call(1) movargs(*0) run() {print hello world} ] rlab(1, *1)
Truth machine
&(0)
label 1 [ call(1) movargs(*0) run() rlab(1, *0) ]
call(2) movargs(*0) run()
rlab(1, *0) call(1) movargs(*0) run()