Updated run() to call new INCLUDED word.
authorTim Vaughan <tgvaughan@gmail.com>
Sat, 8 Oct 2016 22:04:38 +0000 (11:04 +1300)
committerTim Vaughan <tgvaughan@gmail.com>
Sat, 8 Oct 2016 22:04:38 +0000 (11:04 +1300)
src/forth.jl

index 9c62fe6..37c41ec 100644 (file)
@@ -99,6 +99,10 @@ end
 
 getString(addr::Int64, len::Int64) = AbstractString([Char(c) for c in mem[addr:(addr+len-1)]])
 
+function putString(str::AbstractString, addr::Int64)
+    mem[addr:(addr+length(str)-1)] = [Int64(c) for c in str]
+end
+
 function putString(str::AbstractString, addr::Int64, maxLen::Int64)
     len = min(length(str), maxLen)
     mem[addr:(addr+len-1)] = [Int64(c) for c in str]