forth: Forth-ify "LIT", "LITS", "LIT<"
This commit is contained in:
parent
54fd5fbb2b
commit
46833f3819
@ -1,5 +1,9 @@
|
||||
: H HERE @ ;
|
||||
: -^ SWAP - ;
|
||||
: [LITN] LITN ; IMMEDIATE
|
||||
: LIT ROUTINE S [LITN] , ;
|
||||
: LITS LIT SCPY ;
|
||||
: LIT< WORD LITS ; IMMEDIATE
|
||||
: COMPILE ' LITN ['] , , ; IMMEDIATE
|
||||
: [COMPILE] ' , ; IMMEDIATE
|
||||
: BEGIN H ; IMMEDIATE
|
||||
@ -37,7 +41,6 @@
|
||||
H 1 - ( push a. -1 for allot offset )
|
||||
; IMMEDIATE
|
||||
|
||||
: [LITN] LITN ; IMMEDIATE
|
||||
: CREATE
|
||||
WORD (entry) ( empty header with name )
|
||||
ROUTINE C [LITN] ( push cellWord addr )
|
||||
|
@ -988,41 +988,9 @@ SCPY:
|
||||
jp next
|
||||
|
||||
|
||||
.db "LIT"
|
||||
.fill 4
|
||||
.dw SCPY
|
||||
.db 0
|
||||
LIT_:
|
||||
.dw compiledWord
|
||||
.dw NUMBER
|
||||
.dw LIT
|
||||
.dw WR
|
||||
.dw EXIT
|
||||
|
||||
.db "LITS"
|
||||
.fill 3
|
||||
.dw LIT_
|
||||
.db 0
|
||||
LITS:
|
||||
.dw compiledWord
|
||||
.dw LIT_
|
||||
.dw SCPY
|
||||
.dw EXIT
|
||||
|
||||
|
||||
.db "LIT<"
|
||||
.fill 3
|
||||
.dw LITS
|
||||
.db 1 ; IMMEDIATE
|
||||
LITRD:
|
||||
.dw compiledWord
|
||||
.dw WORD
|
||||
.dw LITS
|
||||
.dw EXIT
|
||||
|
||||
.db "(find)"
|
||||
.fill 1
|
||||
.dw LITRD
|
||||
.dw SCPY
|
||||
.db 0
|
||||
FIND_:
|
||||
.dw nativeWord
|
||||
|
Loading…
Reference in New Issue
Block a user