+
+;;; ========================================
+;;; Return stack operations
+
+ WORD p_gtR, '>R',fasm
+ ;; ( x -- ) ( R: -- x )
+ ;; Move x to the return stack.
+ pop rax
+ pushr rax
+ next
+
+ WORD p_Rgt, 'R>',fasm
+ ;; ( -- x ) ( R: x -- )
+ ;; Move x from the return stack to the data stack.
+ popr rax
+ push rax
+ next
+
+ WORD p_Rget, 'R@',fasm
+ ;; ( -- x ) ( R: x -- x )
+ ;; 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