Selaa lähdekoodia

z80: make exec routine a wee bit tighter

1 whole byte!
master
Virgil Dupras 3 vuotta sitten
vanhempi
commit
a82db0739a
3 muutettua tiedostoa jossa 7 lisäystä ja 20 poistoa
  1. +6
    -5
      blk/287
  2. +0
    -12
      blk/288
  3. +1
    -3
      blk/289

+ 6
- 5
blk/287 Näytä tiedosto

@@ -1,8 +1,9 @@
lblexec BSET L1 FSET ( B284 ) L2 FSET ( B286 )
( DE -> wordref )
LDA(DE), DE INCd,
A ORr, IFZ, EXDEHL, JP(HL), THEN,
A DECr, JRZ, L1 FWR ( compiled B289 )
( cell or does. push PFA ) DE PUSH,
LDA(DE), DE INCd, EXDEHL, ( HL points to PFA )
A ORr, IFZ, JP(HL), THEN,
A DECr, ( compiled? ) IFNZ, ( no )
( cell or does. push PFA ) HL PUSH,
A DECr, JRZ, lblnext BWR ( cell )
( continue to does )
HL INCd, HL INCd, LDDE(HL), EXDEHL, ( does )
THEN, ( continue to compiledWord )

+ 0
- 12
blk/288 Näytä tiedosto

@@ -1,12 +0,0 @@
( does. 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>. Therefore, what we need to do
push the cell addr like a regular cell, then follow the
linkfrom the PFA, and then continue as a regular
compiledWord. )
EXDEHL,
HL INCd, HL INCd,
E (HL) LDrr,
HL INCd,
D (HL) LDrr,
( continue to compiledWord )

+ 1
- 3
blk/289 Näytä tiedosto

@@ -1,13 +1,11 @@
( compiled word ) L1 FSET ( execute B301 )
( 1. Push current IP to RS
2. Set new IP to the second atom of the list
3. Execute the first atom of the list. )
IX INCd, IX INCd,
0 IX+ C LDIXYr,
1 IX+ B LDIXYr,
EXDEHL, ( HL points to PFA )
( While we inc, dereference into DE for execute call later. )
LDDE(HL),
HL INCd,
B H LDrr, C L LDrr, ( --> IP )
JR, lblexec BWR ( execute-B287 )
JR, lblexec BWR ( execute-B287 )

Loading…
Peruuta
Tallenna