bug fix !+
[rrq/rrqforth.git] / control.asm
index b6bfe0f005e964ce1773fa025d7d618e01ea95e4..81c4c724e384bcaa6b1ae1d3035619c8c6feae4b 100644 (file)
@@ -165,4 +165,22 @@ p_end_ending:
        pop rbx
        next
 
-       
+       WORD p_again,'AGAIN',fasm,IMMEDIATE
+       ;; Compiling: ( a 0 * -- )
+       ;; Lay out unconditional loop-back, then perform END action
+       mov rax,qword [p_here_DFA]
+       mov qword [rax],p_branch_CFA
+       mov qword [rax+8],0
+       add rax,16
+       mov qword [p_here_DFA],rax
+       mov rbx,rsp
+p_again_loop:
+       cmp qword [rbx],0
+       je p_again_resolve
+       add rbx,8
+       jmp p_again_loop
+p_again_resolve:
+       mov rbx,qword [rbx+8]
+       sub rbx,rax
+       mov qword [rax-8],rbx
+       jmp p_end_DFA