From d6e89d16d332954dde3fc4c5ee7549af7c8bb556 Mon Sep 17 00:00:00 2001 From: sanine-a Date: Mon, 22 May 2023 17:24:43 -0500 Subject: begin writing vm --- src/vm/enum.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/vm/enum.js (limited to 'src/vm/enum.js') 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; -- cgit v1.2.1