From 29ed5eacb80cdfe49bff0d9335241dc3e2188981 Mon Sep 17 00:00:00 2001 From: sanine-a Date: Tue, 23 May 2023 14:15:18 -0500 Subject: add step() --- src/vm/core.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/vm/core.js') diff --git a/src/vm/core.js b/src/vm/core.js index 184be00..a8fbce7 100644 --- a/src/vm/core.js +++ b/src/vm/core.js @@ -81,6 +81,27 @@ class Core { } + initialize(programs) { + const ranges = this.getRanges( + programs.map(p => p.program.length) + ) + + const pc = []; + for (let i=0; i