X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=control.asm;h=949f48c7110c262c6683bbfafaf44d8c1cbcf0b9;hb=421b56b401697dda99a7cfe402f16943ea094cd6;hp=b6bfe0f005e964ce1773fa025d7d618e01ea95e4;hpb=92ed95a59cba9c0685150503196877c3d81fedbc;p=rrq%2Frrqforth.git diff --git a/control.asm b/control.asm index b6bfe0f..949f48c 100644 --- a/control.asm +++ b/control.asm @@ -165,4 +165,23 @@ 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_ifagain_resolve + add rbx,8 + jmp p_ifagain_loop +p_again_resolve: + mov rbx,qword [rbx+8] + sub rbx,rax + mov qword [rax-8],rbx + mov rax,rsp + jmp p_end_scan