mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-30 20:18:06 +11:00
forth: Forth-ify "BOOT"
This commit is contained in:
parent
408d93bd23
commit
5471ef02a7
Binary file not shown.
@ -173,8 +173,9 @@ forthMain:
|
|||||||
; Set up SYSVNXT
|
; Set up SYSVNXT
|
||||||
ld hl, SYSVBUF
|
ld hl, SYSVBUF
|
||||||
ld (SYSVNXT), hl
|
ld (SYSVNXT), hl
|
||||||
ld hl, BEGIN
|
ld hl, .bootName
|
||||||
push hl
|
call find
|
||||||
|
push de
|
||||||
jp EXECUTE+2
|
jp EXECUTE+2
|
||||||
|
|
||||||
.parseName:
|
.parseName:
|
||||||
@ -187,16 +188,8 @@ forthMain:
|
|||||||
.db "(print)", 0
|
.db "(print)", 0
|
||||||
.keyName:
|
.keyName:
|
||||||
.db "KEY", 0
|
.db "KEY", 0
|
||||||
|
.bootName:
|
||||||
BEGIN:
|
.db "BOOT", 0
|
||||||
.dw compiledWord
|
|
||||||
.dw LIT
|
|
||||||
.db "(c<$)", 0
|
|
||||||
.dw FIND_
|
|
||||||
.dw NOT
|
|
||||||
.dw CSKIP
|
|
||||||
.dw EXECUTE
|
|
||||||
.dw INTERPRET
|
|
||||||
|
|
||||||
INTERPRET:
|
INTERPRET:
|
||||||
.dw compiledWord
|
.dw compiledWord
|
||||||
@ -206,7 +199,7 @@ INTERPRET:
|
|||||||
.dw DROP
|
.dw DROP
|
||||||
.dw EXECUTE
|
.dw EXECUTE
|
||||||
|
|
||||||
.fill 13
|
.fill 25
|
||||||
|
|
||||||
; *** Collapse OS lib copy ***
|
; *** Collapse OS lib copy ***
|
||||||
; In the process of Forth-ifying Collapse OS, apps will be slowly rewritten to
|
; In the process of Forth-ifying Collapse OS, apps will be slowly rewritten to
|
||||||
|
@ -63,6 +63,11 @@
|
|||||||
AGAIN
|
AGAIN
|
||||||
;
|
;
|
||||||
|
|
||||||
|
: BOOT
|
||||||
|
LIT< (c<$) (find) IF EXECUTE ELSE DROP THEN
|
||||||
|
_c INTERPRET
|
||||||
|
;
|
||||||
|
|
||||||
( This is only the "early parser" in earlier stages. No need
|
( This is only the "early parser" in earlier stages. No need
|
||||||
for an abort message )
|
for an abort message )
|
||||||
: (parse)
|
: (parse)
|
||||||
|
Loading…
Reference in New Issue
Block a user