figForth Word - ELSE
   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
ELSE addr1 n1 — addr2 n2 (compiling) P,C2,L0 Occurs within a colon-definition in the form: IF … ELSE … ENDIF At run-time, ELSE executes after the true part following IF. ELSE forces execution to skip over the following false part and resumes execution after the ENDIF. It has no stack effect. At compile-time ELSE emplaces BRANCH reserving a branch offset, leaves the address addr2 and n2 for error testing. ELSE also resolves the pending forward branch from IF by calculating the offset from addr1 to HERE and storing at addr1
NFA:    007418 C4             DB   0C4H
        007419 454C53         DB   "ELS"
        00741C C5             DB   'E'+80H
LFA:    00741D 0374           DW   _IF-5
CFA:    00741F 3C28    _ELSE: DW   DOCOL        ;   :
PFA:    007421 C767 DC6A      DW   TWO,QPAIR    ;   2 ?PAIRS
        007425 0B6B           DW   COMP         ;   COMPILE
        007427 C221           DW   BRAN         ;   BRANCH
        007429 0769           DW   HERE         ;   HERE
        00742B BF67           DW   ZERO         ;   0
        00742D 2369           DW   COMMA        ;   ,
        00742F E826           DW   SWAP         ;   SWAP
        007431 C767           DW   TWO          ;   TWO
        007433 6873           DW   THEN         ;   THEN
        007435 C767           DW   TWO          ;   2
        007437 1725           DW   SEMIS        ;   ;
m,hjkh
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