Quellcode durchsuchen

forth: setup SYSVNXT in Forth code

pull/95/head
Virgil Dupras vor 4 Jahren
Ursprung
Commit
031bfc6d72
3 geänderte Dateien mit 6 neuen und 5 gelöschten Zeilen
  1. BIN
      emul/forth/z80c.bin
  2. +4
    -0
      forth/core.fs
  3. +2
    -5
      forth/forth.asm

BIN
emul/forth/z80c.bin Datei anzeigen


+ 4
- 0
forth/core.fs Datei anzeigen

@@ -116,6 +116,10 @@
2 50 @ +!
;

( Set up initial SYSVNXT value, which is 2 bytes after its
own address )
50 @ DUP 2 + SWAP !

: ."
LIT
BEGIN


+ 2
- 5
forth/forth.asm Datei anzeigen

@@ -36,8 +36,7 @@
; 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.
.equ SYSVNXT @+WORD_BUFSIZE
.equ SYSVBUF @+2
.equ RAMEND @+SYSV_BUFSIZE
.equ RAMEND @+SYSV_BUFSIZE+2

; (HERE) usually starts at RAMEND, but in certain situations, such as in stage0,
; (HERE) will begin at a strategic place.
@@ -179,9 +178,6 @@ forthMain:
ld (CURRENT), hl
ld hl, HERE_INITIAL
ld (HERE), hl
; Set up SYSVNXT
ld hl, SYSVBUF
ld (SYSVNXT), hl
ld hl, .bootName
call find
push de
@@ -531,6 +527,7 @@ litWord:
ld (IP), hl
jp next

.fill 6
; *** Dict hook ***
; This dummy dictionary entry serves two purposes:
; 1. Allow binary grafting. Because each binary dict always end with a dummy


Laden…
Abbrechen
Speichern