From: Tim Vaughan Date: Sat, 8 Oct 2016 22:04:38 +0000 (+1300) Subject: Updated run() to call new INCLUDED word. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=b45f369dd68575aa774d2122eaf9b6ec4ec49cb5;p=forth.jl.git Updated run() to call new INCLUDED word. --- diff --git a/src/forth.jl b/src/forth.jl index 9c62fe6..37c41ec 100644 --- a/src/forth.jl +++ b/src/forth.jl @@ -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]