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:
6e2ccc1
)
Exposed debug functions as forth words.
author
Tim Vaughan
<tgvaughan@gmail.com>
Sun, 24 Apr 2016 07:37:45 +0000
(19:37 +1200)
committer
Tim Vaughan
<tgvaughan@gmail.com>
Sun, 24 Apr 2016 07:37:45 +0000
(19:37 +1200)
src/forth.jl
patch
|
blob
|
history
src/lib.fs
patch
|
blob
|
history
diff --git
a/src/forth.jl
b/src/forth.jl
index
b1a78f3
..
ea849cd
100644
(file)
--- a/
src/forth.jl
+++ b/
src/forth.jl
@@
-1017,4
+1017,23
@@
function printRS()
end
end
+DOT = defPrimWord(".", () -> begin
+ print(popPS())
+ return NEXT
+end)
+
+DOTS = defPrimWord(".s", () -> begin
+ printPS()
+ return NEXT
+end)
+
+DUMP = defPrimWord("DUMP", () -> begin
+ count = popPS()
+ addr = popPS()
+
+ dump(addr, count=count)
+
+ return NEXT
+end)
+
end
diff --git
a/src/lib.fs
b/src/lib.fs
index
daaa80c
..
f4883c5
100644
(file)
--- a/
src/lib.fs
+++ b/
src/lib.fs
@@
-15,5
+15,5
@@
: LITERAL IMMEDIATE ' LIT , , ;
-: ':' [ CHAR : ] ;
+: ':' [ CHAR : ]
LITERAL
;