projects
/
rrq
/
rrqforth.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more and better documentation and some reorganisation
[rrq/rrqforth.git]
/
stack.asm
diff --git
a/stack.asm
b/stack.asm
index d26bf7b2c9d137fd2dc9a152653cbd59d33590a3..5b6910b5cb3bef019f7e10336ca62a4e05194042 100644
(file)
--- a/
stack.asm
+++ b/
stack.asm
@@
-132,7
+132,7
@@
p_roll_eq:
;;; ========================================
;;; Return stack operations
;;; ========================================
;;; Return stack operations
- WORD p_
l
tR, '>R',fasm
+ WORD p_
g
tR, '>R',fasm
;; ( x -- ) ( R: -- x )
;; Move x to the return stack.
pop rax
;; ( x -- ) ( R: -- x )
;; Move x to the return stack.
pop rax
@@
-151,3
+151,12
@@
p_roll_eq:
;; Copy x from the return stack to the data stack.
push qword [rbp]
next
;; Copy x from the return stack to the data stack.
push qword [rbp]
next
+
+ WORD p_rsp,'R[n]',fasm
+ ;; ( n -- a )
+ ;; push the address of the n:th cell on the return stack
+ mov rax,qword [rsp]
+ shl rax,3
+ add rax,rbp
+ mov qword [rsp],rax
+ next