mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-26 05:48:06 +11:00
forth: Forth-ify "LIT", "LITS", "LIT<"
This commit is contained in:
parent
54fd5fbb2b
commit
46833f3819
@ -1,5 +1,9 @@
|
|||||||
: H HERE @ ;
|
: H HERE @ ;
|
||||||
: -^ SWAP - ;
|
: -^ SWAP - ;
|
||||||
|
: [LITN] LITN ; IMMEDIATE
|
||||||
|
: LIT ROUTINE S [LITN] , ;
|
||||||
|
: LITS LIT SCPY ;
|
||||||
|
: LIT< WORD LITS ; IMMEDIATE
|
||||||
: COMPILE ' LITN ['] , , ; IMMEDIATE
|
: COMPILE ' LITN ['] , , ; IMMEDIATE
|
||||||
: [COMPILE] ' , ; IMMEDIATE
|
: [COMPILE] ' , ; IMMEDIATE
|
||||||
: BEGIN H ; IMMEDIATE
|
: BEGIN H ; IMMEDIATE
|
||||||
@ -37,7 +41,6 @@
|
|||||||
H 1 - ( push a. -1 for allot offset )
|
H 1 - ( push a. -1 for allot offset )
|
||||||
; IMMEDIATE
|
; IMMEDIATE
|
||||||
|
|
||||||
: [LITN] LITN ; IMMEDIATE
|
|
||||||
: CREATE
|
: CREATE
|
||||||
WORD (entry) ( empty header with name )
|
WORD (entry) ( empty header with name )
|
||||||
ROUTINE C [LITN] ( push cellWord addr )
|
ROUTINE C [LITN] ( push cellWord addr )
|
||||||
|
@ -988,41 +988,9 @@ SCPY:
|
|||||||
jp next
|
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)"
|
.db "(find)"
|
||||||
.fill 1
|
.fill 1
|
||||||
.dw LITRD
|
.dw SCPY
|
||||||
.db 0
|
.db 0
|
||||||
FIND_:
|
FIND_:
|
||||||
.dw nativeWord
|
.dw nativeWord
|
||||||
|
Loading…
Reference in New Issue
Block a user