mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 23:18:05 +11:00
forth: setup SYSVNXT in Forth code
This commit is contained in:
parent
e5ab0dd1c9
commit
031bfc6d72
Binary file not shown.
@ -116,6 +116,10 @@
|
|||||||
2 50 @ +!
|
2 50 @ +!
|
||||||
;
|
;
|
||||||
|
|
||||||
|
( Set up initial SYSVNXT value, which is 2 bytes after its
|
||||||
|
own address )
|
||||||
|
50 @ DUP 2 + SWAP !
|
||||||
|
|
||||||
: ."
|
: ."
|
||||||
LIT
|
LIT
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -36,8 +36,7 @@
|
|||||||
; that we can't compile a regular variable in it. SYSVNXT points to the next
|
; that we can't compile a regular variable in it. SYSVNXT points to the next
|
||||||
; free space in SYSVBUF. Then, at the word level, it's a regular sysvarWord.
|
; free space in SYSVBUF. Then, at the word level, it's a regular sysvarWord.
|
||||||
.equ SYSVNXT @+WORD_BUFSIZE
|
.equ SYSVNXT @+WORD_BUFSIZE
|
||||||
.equ SYSVBUF @+2
|
.equ RAMEND @+SYSV_BUFSIZE+2
|
||||||
.equ RAMEND @+SYSV_BUFSIZE
|
|
||||||
|
|
||||||
; (HERE) usually starts at RAMEND, but in certain situations, such as in stage0,
|
; (HERE) usually starts at RAMEND, but in certain situations, such as in stage0,
|
||||||
; (HERE) will begin at a strategic place.
|
; (HERE) will begin at a strategic place.
|
||||||
@ -179,9 +178,6 @@ forthMain:
|
|||||||
ld (CURRENT), hl
|
ld (CURRENT), hl
|
||||||
ld hl, HERE_INITIAL
|
ld hl, HERE_INITIAL
|
||||||
ld (HERE), hl
|
ld (HERE), hl
|
||||||
; Set up SYSVNXT
|
|
||||||
ld hl, SYSVBUF
|
|
||||||
ld (SYSVNXT), hl
|
|
||||||
ld hl, .bootName
|
ld hl, .bootName
|
||||||
call find
|
call find
|
||||||
push de
|
push de
|
||||||
@ -531,6 +527,7 @@ litWord:
|
|||||||
ld (IP), hl
|
ld (IP), hl
|
||||||
jp next
|
jp next
|
||||||
|
|
||||||
|
.fill 6
|
||||||
; *** Dict hook ***
|
; *** Dict hook ***
|
||||||
; This dummy dictionary entry serves two purposes:
|
; This dummy dictionary entry serves two purposes:
|
||||||
; 1. Allow binary grafting. Because each binary dict always end with a dummy
|
; 1. Allow binary grafting. Because each binary dict always end with a dummy
|
||||||
|
Loading…
Reference in New Issue
Block a user