1 // control.asm: WORD p_branch,'BRANCH',fasm
11 "BRANCH" is a function word that implements execution transfer by
12 means of adding the subsequent branch offset to the point of
15 Note that the branch offset is a byte count and each FORTH word of a
16 definition take up a cell of 8 bytes. The offset is relative to the
17 cell address immediately subsequent to the offset cell. In other
18 words, offset 0 is not branching anywhere and an offset of -16 would
19 make a tight loop back to the branch instruction itself. The latter
20 would pull data stack values until and including the first zero value.
22 See also <<p_0branch,0BRANCH>>, <<p_1branch,1BRANCH>>, <<p_if,IF>>,
23 <<p_else,ELSE>>, <<p_ifbreak,IFBREAK>> and <<p_ifagain,IFAGAIN>>.