From a82db0739a63f8c83e957d2152f3d603ec82ad8e Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Wed, 28 Oct 2020 13:28:27 -0400 Subject: [PATCH] z80: make exec routine a wee bit tighter 1 whole byte! --- blk/287 | 11 ++++++----- blk/288 | 12 ------------ blk/289 | 4 +--- 3 files changed, 7 insertions(+), 20 deletions(-) delete mode 100644 blk/288 diff --git a/blk/287 b/blk/287 index 9f66c93..69819b6 100644 --- a/blk/287 +++ b/blk/287 @@ -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 ) diff --git a/blk/288 b/blk/288 deleted file mode 100644 index 3ce34a8..0000000 --- a/blk/288 +++ /dev/null @@ -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 ) diff --git a/blk/289 b/blk/289 index 849e5c4..40e7ed7 100644 --- a/blk/289 +++ b/blk/289 @@ -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 )