From: Tim Vaughan Date: Sat, 23 Apr 2016 02:11:24 +0000 (+1200) Subject: Interpreter almost works!!! X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=forth.jl.git;a=commitdiff_plain;h=33bbd427e6e9063f0cde9cf027fe2933f7084cb5 Interpreter almost works!!! --- diff --git a/src/forth.jl b/src/forth.jl index d6a10e6..27f9dc3 100644 --- a/src/forth.jl +++ b/src/forth.jl @@ -842,6 +842,11 @@ end) #### VM loop #### function runVM() + # Start with IP pointing to first instruction of outer interpreter + reg.IP = QUIT + 1 + + # Primitive processing loop. + # Everyting else is simply a consequence of this loop! jmp = mem[NEXT] while (jmp = callPrim(jmp)) != 0 end end