Bladeren bron

forth: remove sysvarWord type

Not needed anymore. CONSTANT does the trick.
pull/95/head
Virgil Dupras 4 jaren geleden
bovenliggende
commit
5c03b33982
3 gewijzigde bestanden met toevoegingen van 8 en 19 verwijderingen
  1. BIN
      emul/forth/z80c.bin
  2. +4
    -7
      forth/core.fs
  3. +4
    -12
      forth/forth.asm

BIN
emul/forth/z80c.bin Bestand weergeven


+ 4
- 7
forth/core.fs Bestand weergeven

@@ -108,15 +108,12 @@
in dictionary.txt ) in dictionary.txt )


: (sysv) : (sysv)
(entry)
( 8 == sysvarWord )
8 ,
( 50 == SYSVNXT )
[ 50 @ LITN ] DUP ( a a )
( Get new sysv addr ) ( Get new sysv addr )
@ , ( a )
( 50 == SYSVNXT )
50 @ @
CONSTANT
( increase current sysv counter ) ( increase current sysv counter )
2 SWAP +!
2 50 @ +!
; ;


: ." : ."


+ 4
- 12
forth/forth.asm Bestand weergeven

@@ -53,9 +53,9 @@
jp forthMain jp forthMain
; 3 ; 3
jp find jp find
.dw 0 ; unused
; 8
jp sysvarWord
nop \ nop ; unused
nop \ nop \ nop ; unused
; 11
jp cellWord jp cellWord
jp compiledWord jp compiledWord
jp pushRS jp pushRS
@@ -512,13 +512,6 @@ cellWord:
push iy push iy
jp next jp next


; Pushes the address in the first word of the PF
sysvarWord:
ld l, (iy)
ld h, (iy+1)
push hl
jp next

; The word was spawned from a definition word that has a DOES>. PFA+2 (right ; The word was spawned from a definition word that has a DOES>. PFA+2 (right
; after the actual cell) is a link to the slot right after that DOES>. ; after the actual cell) is a link to the slot right after that DOES>.
; Therefore, what we need to do push the cell addr like a regular cell, then ; Therefore, what we need to do push the cell addr like a regular cell, then
@@ -561,10 +554,9 @@ litWord:
; entry, we always have a predictable prev offset for the grafter's first ; entry, we always have a predictable prev offset for the grafter's first
; entry. ; entry.
; 2. Tell icore's "_c" routine where the boot binary ends. See comment there. ; 2. Tell icore's "_c" routine where the boot binary ends. See comment there.

.db "_bend" .db "_bend"
.dw $-EXECUTE .dw $-EXECUTE
.db 5 .db 5


; Offset: 0253
; Offset: 0249
.out $ .out $

Laden…
Annuleren
Opslaan