diff options
author | sanine-a <sanine.not@pm.me> | 2023-05-22 17:24:43 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2023-05-22 17:24:43 -0500 |
commit | d6e89d16d332954dde3fc4c5ee7549af7c8bb556 (patch) | |
tree | 46ae395bda119c5e59ae40140226c55205bca772 /src/vm/enum.js | |
parent | 9fa301a7cf8e8b5883521d1a966ee7b65ecf925e (diff) |
begin writing vm
Diffstat (limited to 'src/vm/enum.js')
-rw-r--r-- | src/vm/enum.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/vm/enum.js b/src/vm/enum.js new file mode 100644 index 0000000..5271991 --- /dev/null +++ b/src/vm/enum.js @@ -0,0 +1,27 @@ +'use strict'; + +const Op = { + DAT: 'DAT', + MOV: 'MOV', + ADD: 'ADD', + SUB: 'SUB', + JMP: 'JMP', + JMZ: 'JMZ', + JMN: 'JMN', + CMP: 'CMP', + SLT: 'SLT', + DJN: 'DJN', + SPL: 'SPL', +}; + + +const AddrMode = { + Immediate: 'immediate', + Indirect: 'indirect', + Predecrement: 'predecrement', + Direct: 'direct', +}; + + +exports.Op = Op; +exports.AddrMode = AddrMode; |