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/core.js | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/vm/core.js (limited to 'src/vm/core.js') diff --git a/src/vm/core.js b/src/vm/core.js new file mode 100644 index 0000000..292ceb0 --- /dev/null +++ b/src/vm/core.js @@ -0,0 +1,51 @@ +'use strict'; + +const { Op, AddrMode} = require('./enum.js'); + + +class Core { + constructor(size) { + this.data = new Array(size); + + // initialize core to all DAT 0, 0 + for (let i=0; i