added BRANCH macro for assembler
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Wed, 19 May 2021 07:44:18 +0000 (17:44 +1000)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Wed, 19 May 2021 07:44:18 +0000 (17:44 +1000)
machine.asm

index 357b80718695b4ea3dc56ff09f5c21eb3eccc927..90310145359539274faf91e6aece21e0fffb4e00 100644 (file)
@@ -153,7 +153,7 @@ label:
            dq doforth
        else
            if doer in <fasm>
-               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
+}