From: Ralph Ronnquist Date: Wed, 19 May 2021 07:44:18 +0000 (+1000) Subject: added BRANCH macro for assembler X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=74e26fb7ed992b0c8a53988eb4e717ec3e04248a;p=rrq%2Frrqforth.git added BRANCH macro for assembler --- diff --git a/machine.asm b/machine.asm index 357b807..9031014 100644 --- a/machine.asm +++ b/machine.asm @@ -153,7 +153,7 @@ label: dq doforth else if doer in - dq label#_DFA + dq dofasm ; label#_DFA else dq doer end if @@ -225,3 +225,13 @@ common dataend: } +;;; ======================================== +;;; The BRANCH macro lays out FORTH words BRANCH and 0BRANCH with offset +macro BRANCH zero,label { + if zero in <0> + dq p_zero_branch + else + dq p_zero_branch + end if + dq label - $ - 8 +}