The Lambda Lab
/
projects
/
forth.jl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f73031b
)
Fixed INCLUDED bug.
author
Tim Vaughan
<tgvaughan@gmail.com>
Sun, 9 Oct 2016 00:51:29 +0000
(13:51 +1300)
committer
Tim Vaughan
<tgvaughan@gmail.com>
Sun, 9 Oct 2016 00:51:29 +0000
(13:51 +1300)
src/forth.jl
patch
|
blob
|
history
diff --git
a/src/forth.jl
b/src/forth.jl
index
438730f
..
acd6c45
100644
(file)
--- a/
src/forth.jl
+++ b/
src/forth.jl
@@
-1030,7
+1030,7
@@
WORD_CFA = defPrimWord("WORD", () -> begin
mem[countAddr] = count
pushPS(countAddr)
mem[countAddr] = count
pushPS(countAddr)
- println("Processing word: '$(getString(countAddr+1,mem[countAddr]))'")
+
#
println("Processing word: '$(getString(countAddr+1,mem[countAddr]))'")
return NEXT
end)
return NEXT
end)
@@
-1231,7
+1231,7
@@
INCLUDED_CFA = defWord("INCLUDED",
DUP_CFA, SOURCE_ID_CFA, STORE_CFA, # Mark this as the current source
DUP_CFA, QUERY_FILE_CFA, # Read line from file
INTERPRET_CFA, # Interpret line
DUP_CFA, SOURCE_ID_CFA, STORE_CFA, # Mark this as the current source
DUP_CFA, QUERY_FILE_CFA, # Read line from file
INTERPRET_CFA, # Interpret line
-
INVERT_CFA, ZBRANCH_CFA, -5,
# Loop if not EOF
+
ZBRANCH_CFA, -4,
# Loop if not EOF
CLOSE_FILE_CFA, DROP_CFA, # Close file
FROMR_CFA, SOURCE_ID_CFA, STORE_CFA, # Restore input source
EXIT_CFA])
CLOSE_FILE_CFA, DROP_CFA, # Close file
FROMR_CFA, SOURCE_ID_CFA, STORE_CFA, # Restore input source
EXIT_CFA])
@@
-1289,8
+1289,8
@@
function run(;initialize=true)
jmp = mem[EXIT_CFA]
while jmp != 0
try
jmp = mem[EXIT_CFA]
while jmp != 0
try
- print("Entering prim $(getPrimName(jmp)), PS: ")
- printPS()
+
#
print("Entering prim $(getPrimName(jmp)), PS: ")
+
#
printPS()
jmp = callPrim(jmp)
jmp = callPrim(jmp)