1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 16:48:05 +11:00

forth: add "CODE"!!!

This commit is contained in:
Virgil Dupras 2020-03-22 12:08:50 -04:00
parent 46833f3819
commit 00de336976

View File

@ -1,12 +1,19 @@
( Z80 assembler ) ( Z80 assembler )
: CODE
( same as CREATE, but with ROUTINE V )
WORD (entry)
ROUTINE V [LITN] ,
;
( Splits word into msb/lsb, lsb being on TOS ) ( Splits word into msb/lsb, lsb being on TOS )
: SPLITB : SPLITB
DUP 0x100 / DUP 0x100 /
SWAP 0xff AND SWAP 0xff AND
; ;
: A, .X ; ( To debug, change C, to .X )
: A, C, ;
7 CONSTANT A 7 CONSTANT A
0 CONSTANT B 0 CONSTANT B
1 CONSTANT C 1 CONSTANT C
@ -122,3 +129,4 @@
( Specials ) ( Specials )
: JRe, 0x18 A, 2 - A, ; : JRe, 0x18 A, 2 - A, ;
: JPNEXT, ROUTINE N [LITN] JPnn, ;