--- /dev/null
+// control.asm: WORD p_again,'AGAIN',fasm
+
+anchor:p_again[]
+
+=== Word: AGAIN
+
+....
+Data stack: Compiling: ( -- a )
+....
+
+"AGAIN" is an immediate function word that is used together with
+<<p_begin,BEGIN>> and instead of <<p_end,END>> to implement structured
+execution control. AGAIN scans the datastack for the nearest preceding
+BEGIN marker and lays out an unconditional branch from this point the
+beginning of the block during execution. It thereafter performs the
+<<p_end,END>> compile action to end the block.
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
include::separator.adoc[]
include::adoc/p_abs.adoc[]
include::separator.adoc[]
+include::adoc/p_again.adoc[]
+include::separator.adoc[]
include::adoc/p_allot.adoc[]
include::separator.adoc[]
include::adoc/p_and.adoc[]
xref:p_2swap[2SWAP] {nbsp}
xref:p_abs[ABS] {nbsp}
+xref:p_again[AGAIN] {nbsp}
xref:p_allot[ALLOT] {nbsp}
xref:p_and[AND] {nbsp}
<<inline_code,[ASM]>> {nbsp}