Table of Contents

AVM opcodes

  1. EXEC(0x0010), exec statement
  2. EXIT(0x0020), exit statement
  3. IN(0x0030), in on port with value, blocking
  4. IN_SF(0x0031), in on port with value, success and failure alternatives
  5. IN_F(0x0032), in on port with value, failure only branch
  6. IN_S(0x0033), in on port with value, success only branch
  7. IN_NV(0x0034), in on port, signal, blocking
  8. IN_SF_NV(0x0035), in on port, signal, success and failure alternatives
  9. IN_F_NV(0x0036), in on port, signal, failure only branch
  10. IN_S_NV(0x0037), in on port, signal, success only branch
  11. JUMP(0x0040), jump to label
  12. LOOP_INF(0x0050), infinite loop
  13. LOOP_COND(0x0051), loop with conditional statement
  14. NULL(0x0060), null instruction
  15. OUT(0x0070), out on port with value, blocking
  16. OUT_SF(0x0071), out on port with value, success and failure alternatives
  17. OUT_F(0x0072), out on port with value, failure only branch
  18. OUT_S(0x0073), out on port with value, success only branch
  19. OUT_NV(0x0074), out on port, signal, blocking
  20. OUT_SF_NV(0x0075), out on port, signal, success and failure alternatives
  21. OUT_F_NV(0x0076), out on port, signal, failure only branch
  22. OUT_S_NV(0x0077), out on port, signal, success only branch
  23. PROC(0x0080), proc without conditional statement
  24. PROC_G(0x0081), proc with conditional statement
  25. SELECT(0x0090), select instruction
  26. START(0x00a0); start instruction
  27. ADD(0x1000), add operands
  28. SUB(0x1001), subtract operands
  29. MUL(0x1002), multiply operands
  30. DIV(0x1003), divide operands
  31. HEAD(0x1004) get head of a list
  32. TAIL(0x1005) get tail of a list
  33. INS(0x1006), insert element in list at the beginning
  34. APP(0x1007), append element to list
  35. AND(0x1008), logical and
  36. OR(0x1009), logical or
  37. NOT(0x100a); logical not

Bytecode format

Header and complete code