home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / editors / mutt / me2s_pl7.zoo / mu_edit2 / mc2 / opcode.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-26  |  2.0 KB  |  151 lines

  1. /* opcode.h : opcodes and opcode names for the Mutt Machine
  2.  */
  3.  
  4. /* Craig Durland    Public Domain
  5.  *   Distributed "as is", without warranties of any kind, but comments,
  6.  *     suggestions and bug reports are welcome.
  7.  */
  8.  
  9.     /* extern opcodes */
  10. #define CONCAT         1
  11. #define MSG         2
  12. #define ASK         3
  13. #define INSERT_OBJ     4
  14. #define EXTRACT_EL     5
  15. #define EXTRACT_ELS     6
  16. #define REMOVE_ELS     7
  17.  
  18.     /* op codes */
  19. #define HALT         0
  20. #define DONE         1
  21.  
  22. #define ASKUSER         2
  23.  
  24. #define RVBOOL         3
  25. #define RVNUM8         4
  26. #define RVNUM16         5
  27. #define RVNUM32         6
  28. #define RVSTR         7
  29. #define RVVOID         8
  30.  
  31. #define ADD         9
  32. #define SUB        10
  33. #define MUL        11
  34. #define DIV        12
  35.  
  36. #define CMP        13
  37. #define NOT        14
  38. #define LT        15
  39. #define LTE        16
  40.  
  41. #define JMP        17
  42. #define JMPTRUE        18
  43. #define JMPFALSE    19
  44.  
  45. #define ARG        20
  46. #define NARGS        21
  47. #define PUSHARGS    22
  48.  
  49. #define PUSHRV        23
  50. #define SHOVERV        24
  51. #define DUP        25
  52. #define POP        26
  53.  
  54. #define PUSHTOKEN    27
  55. #define PUSHXT        28
  56. #define PUSHNAME    29
  57. #define PUSHADDR    30
  58. #define FADDR        31
  59.  
  60. #define DOOP        32
  61.  
  62. #define TYPECHECK    33
  63.  
  64. #define LALLOC        34
  65. #define GETLVAR        35
  66. #define GETGVAR        36
  67. #define SETLVAR        37
  68. #define SETGVAR        38
  69.  
  70. #define RVLBASE        39
  71. #define RVGBASE        40
  72. #define GETRVAR        41
  73. #define SETRVAR        42
  74.  
  75. #define CREATE_OBJ    43
  76. #define LEN_OF        44
  77.  
  78. #define CONVERT_TO    45
  79.  
  80. #define STOP        46
  81.  
  82.  
  83. #if OPNAMES
  84.  
  85. char *opname[] =    /* op code names */
  86. {
  87.   "halt",
  88.   "done",
  89.  
  90.   "ask-user",
  91.  
  92.   "set-RV-to",
  93.   "set-RV-to",
  94.   "set-RV-to",
  95.   "set-RV-to",
  96.   "set-RV-to",
  97.   "set-RV-to-VOID",
  98.  
  99.   "add",
  100.   "subtract",
  101.   "multiply",
  102.   "divide",
  103.  
  104.   "compare",
  105.   "not",
  106.   "<",
  107.   "<=",
  108.  
  109.   "jmp",
  110.   "jmp-TRUE",
  111.   "jmp-FALSE",
  112.  
  113.   "arg",
  114.   "num-args",
  115.   "push-args",
  116.  
  117.   "push-RV",
  118.   "shove-RV",
  119.   "dup",
  120.   "pop",
  121.  
  122.   "push-token",
  123.   "push-X-token",
  124.   "push-name",
  125.   "push-address",
  126.   "fcn-addr",
  127.  
  128.   "do-OP",
  129.  
  130.   "typecheck",
  131.  
  132.   "lalloc",
  133.   "get-local-var",
  134.   "get-global-var",
  135.   "set-local-var",
  136.   "set-global-var",
  137.  
  138.   "local-vars",
  139.   "global-vars",
  140.   "get-var-rel",
  141.   "set-var-rel",
  142.  
  143.   "create-object",
  144.   "length-of",
  145.  
  146.   "convert-to",
  147.  
  148.   "stop",
  149. };
  150. #endif
  151.