projects
/
rrq
/
rrqforth.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa0b9f4
)
add DEPTH
author
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Sun, 23 May 2021 14:48:07 +0000
(
00:48
+1000)
committer
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Sun, 23 May 2021 14:48:07 +0000
(
00:48
+1000)
stack.asm
patch
|
blob
|
history
diff --git
a/stack.asm
b/stack.asm
index 91be19d71963d217ee453051f14abdc80cc9d2b2..32db5aef859f3734a55e32bd854ee68722a27cfd 100644
(file)
--- a/
stack.asm
+++ b/
stack.asm
@@
-1,5
+1,14
@@
;;; Words for stack manipulations
+ WORD p_depth,'DEPTH',fasm
+ ;; ( -- v )
+ ;; Push stack depth (before push)
+ lea rax,[DS_TOP]
+ sub rax,rsp
+ shr rax,3
+ push rax
+ next
+
WORD p_dup, 'DUP',fasm
;; ( v -- v v )
;; Duplicate top ov stack value.