z80: make exec routine a wee bit tighter

1 whole byte!
This commit is contained in:
Virgil Dupras 2020-10-28 13:28:27 -04:00
parent 788453b89c
commit a82db0739a
3 changed files with 7 additions and 20 deletions

11
blk/287
View File

@ -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 )

12
blk/288
View File

@ -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 )

View File

@ -1,11 +1,9 @@
( 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,