From 00de3369768d128ef1eee4847d478744b450b6d2 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sun, 22 Mar 2020 12:08:50 -0400 Subject: [PATCH] forth: add "CODE"!!! --- forth/z80a.fs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/forth/z80a.fs b/forth/z80a.fs index ef095a7..80b8513 100644 --- a/forth/z80a.fs +++ b/forth/z80a.fs @@ -1,12 +1,19 @@ ( Z80 assembler ) +: CODE + ( same as CREATE, but with ROUTINE V ) + WORD (entry) + ROUTINE V [LITN] , +; + ( Splits word into msb/lsb, lsb being on TOS ) : SPLITB DUP 0x100 / SWAP 0xff AND ; -: A, .X ; +( To debug, change C, to .X ) +: A, C, ; 7 CONSTANT A 0 CONSTANT B 1 CONSTANT C @@ -122,3 +129,4 @@ ( Specials ) : JRe, 0x18 A, 2 - A, ; +: JPNEXT, ROUTINE N [LITN] JPnn, ;