X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;ds=sidebyside;f=adoc%2Fp_1branch.adoc;h=8d1b7ca9b690e0dfc5a3183514466d7df563906a;hb=9b8fcf87eaed58b6dfabcf885f8eef5484643de6;hp=0483d007675b34f32953b604d7119df78480f13f;hpb=c8819ee75b180664d649f542f4448122f6c4cdce;p=rrq%2Frrqforth.git diff --git a/adoc/p_1branch.adoc b/adoc/p_1branch.adoc index 0483d00..8d1b7ca 100644 --- a/adoc/p_1branch.adoc +++ b/adoc/p_1branch.adoc @@ -14,3 +14,12 @@ the point of execution. If the value, v, is non-zero then the branch offset is added, and otherwise execution continues with the cell following the branch offset in the definition. +Note that the branch offset is a byte count and each FORTH word of a +definition take up a cell of 8 bytes. The offset is relative to the +cell address immediately subsequent to the offset cell. In other +words, offset 0 is not branching anywhere and an offset of -16 would +make a tight loop back to the branch instruction itself. The latter +would pull data stack values until and including the first zero value. + +See also <>, <>, <>, +<>, <> and <>.