From 74e26fb7ed992b0c8a53988eb4e717ec3e04248a Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Wed, 19 May 2021 17:44:18 +1000 Subject: [PATCH] added BRANCH macro for assembler --- machine.asm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 +} -- 2.39.2