figForth Word - AGAIN
Some parts of this page/site are currently incomplete & will be updated asap
Other parts will change continually so use “Refresh” in your browser !!
There is extensive use of “Tooltips” text to support learning which do
not seem to render on a Smartphone
AGAIN addr n --- (compile-time) P,C2,L0
Used in a colon-definition in the form:
BEGIN ... AGAIN
At run-time, AGAIN forces execution to return to the corresponding BEGIN
There is no effect on the stack. Execution cannot leave this loop
(unless R> DROP is executed one level below)
At compile=time, AGAIN compiles BRANCH with an offset from HERE to addr
n is used for compile-time error checking
Associated Words: BEGIN HERE R> DROP ?PAIRS BACK
NFA: 0073CE C5 DB 0C5H
0073CF 41474149 DB "AGAI"
0073D3 CE DB 'N'+80H
LFA: 0073D4 B873 DW UNTIL-8
CFA: 0073D6 3C28 AGAIN: DW DOCOL ; :
PFA: 0073D8 C367 DC6A DW ONE,QPAIR ; 1 ?PAIRS
0073DC 0B6B DW COMP ; COMPILE
0073DE C221 DW BRAN ; BRANCH
0073E0 4573 DW BACK ; BACK
0073E2 1725 DW SEMIS ; ;
nbb
NFA: 0021B9 86 DB 86H
0021BA 4252414E 43 DB "BRANC"
0021BF C8 DB 'H'+80H
LFA: 0021C0 A921 DW EXEC-10
CFA: 0021C2 C421 BRAN: DW $+2
PFA: 0021C4 60 BRAN1: LD H,B
0021C5 69 LD L,C
0021C6 5E LD E,(HL)
0021C7 23 INC HL
0021C8 56 LD D,(HL)
0021C9 2B DEC HL
0021CA 19 ADD HL,DE
0021CB 4D LD C,L
0021CC 44 LD B,H
0021CD C3 E2 20 JP NEXT