From: Tim Vaughan Date: Sun, 10 Apr 2016 00:03:33 +0000 (+1200) Subject: Moving further away from julia X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=b96f436aa006ef1da7e9e67ea545675cbbe080f8;p=forth.jl.git Moving further away from julia --- diff --git a/src/forth.jl b/src/forth.jl index 67dd77d..60646ff 100644 --- a/src/forth.jl +++ b/src/forth.jl @@ -1,11 +1,16 @@ module forth -RS = Array{Int, 1}() -DS = Array{Int, 1}() + +RS = Array{Int64, 1}(1024) +RSP = 1 + +PS = Array{Int64, 1}(1024) +PSP = 1 IP = 0 W = 0 X = 0 + jmp = nothing primitives = Array{Expr,1}() @@ -38,10 +43,15 @@ EXIT = addPrim("exit", :(begin jmp = NEXT end)) + + + # VM loop -#jmp = NEXT -#while true -# eval(jmp) -#end +jmp = NEXT +function runVM() + while true + eval(jmp) + end +end end