forth: rename "LITS" to "LIT<"

This commit is contained in:
Virgil Dupras 2020-03-21 16:27:21 -04:00
parent 4627e1c977
commit 145fdd8e05
3 changed files with 9 additions and 14 deletions

View File

@ -5,7 +5,7 @@
: BEGIN H ; IMMEDIATE
: AGAIN COMPILE (bbr) H -^ C, ; IMMEDIATE
: UNTIL COMPILE SKIP? COMPILE (bbr) H -^ C, ; IMMEDIATE
: ( BEGIN LITS ) WORD SCMP NOT UNTIL ; IMMEDIATE
: ( BEGIN LIT< ) WORD SCMP NOT UNTIL ; IMMEDIATE
( Hello, hello, krkrkrkr... do you hear me?
Ah, voice at last! Some lines above need comments
BTW: Forth lines limited to 64 cols because of default

View File

@ -143,7 +143,8 @@ CMP n1 n2 -- n Compare n1 and n2 and set n to -1, 0, or 1.
NOT f -- f Push the logical opposite of f
*** Strings ***
LITS x -- a Read following LIT and push its addr to a
LIT< x -- Read following word and write to HERE as a string
literal.
SCMP a1 a2 -- n Compare strings a1 and a2. See CMP
SLEN a -- n Push length of str at a.

View File

@ -988,25 +988,19 @@ LITN:
ld (HERE), hl
jp next
.db "LITS"
.db "LIT<"
.fill 3
.dw LITN
.db 1 ; IMMEDIATE
LITS:
LITRD:
.dw compiledWord
.dw .wrLIT
.dw NUMBER
.dw LIT
.dw WR
.dw WORD
.dw .scpy
.dw EXIT
.wrLIT:
.dw nativeWord
ld hl, (HERE)
ld de, LIT
call DEinHL
ld (HERE), hl
jp next
.scpy:
.dw nativeWord
pop hl
@ -1018,7 +1012,7 @@ LITS:
.db "(find)"
.fill 1
.dw LITS
.dw LITRD
.db 0
FIND_:
.dw nativeWord