commen editing
[rrq/rrqforth.git] / memory.asm
index 6e945ff3331fbe6fd5639f33806dbb795545dde3..64f54bce09e24d698485b61b2d62ad97677d122e 100644 (file)
@@ -1,5 +1,29 @@
 ;;; This file defines "memory access words"
 
+       WORD p_tfa2cfa,'TFA>CFA',fasm
+       ;; ( tfa -- cfa )
+       ;; Advance a word tfa pointer to the cfa field
+       mov rax,qword[rsp]
+       tfa2cfa rax
+       mov qword [rsp],rax
+       next
+       
+       WORD p_tfa2dfa,'TFA>DFA',fasm
+       ;; ( tfa -- dfa )
+       ;; Advance a word tfa pointer to the dfa field
+       mov rax,qword[rsp]
+       tfa2dfa rax
+       mov qword [rsp],rax
+       next
+
+       WORD p_dfa2tfa,'DFA>TFA',fasm
+       ;; ( dfa -- tfa )
+       ;; Advance a word tfa pointer to the dfa field
+       mov rax,qword[rsp]
+       mov rax,qword [rax-24]  ; tfa
+       mov qword [rsp],rax
+       next
+
        WORD p_get, '@',fasm
        ;; ( addr -- v )
        ;; Load value v from address addr