Quudo

From Esolang
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"
  1. print string/integer (data)
  2. receive input from stdin (data)
  3. exit program (code)
  4. add number (addend, addend, resultvar)
  5. subtract number (num1, num2, resultvar)
  6. multiply number (num1, num2, resultvar)
  7. divide number (num1, num2, resultvar)
  8. equals (first, second, resultvar)
  9. not equals (first, second, resultvar)
  10. greater than (first, second, resultvar)
  11. less than (first, second, resultvar)
  12. read file (filename, resultvar)
  13. write file (filename, datatowrite)
  14. delete file (filename)
  15. generate random number (remainder)
  16. system command (systemcmd)
  17. print ASCII character (char)
  18. logical and (op1, op2, res)
  19. 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()

Download