z80: remove call indirections in tight spots

This commit is contained in:
Virgil Dupras 2020-06-14 09:29:34 -04:00
parent 2b7abf802f
commit 31095bc04d
6 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
: OP1 CREATE C, DOES> C@ A, ;
0xf3 OP1 DI, 0xfb OP1 EI,
0xeb OP1 EXDEHL, 0xd9 OP1 EXX,
0x08 OP1 EXAFAF',
0x08 OP1 EXAFAF', 0xe3 OP1 EX(SP)HL,
0x76 OP1 HALT, 0xe9 OP1 JP(HL),
0x12 OP1 LD(DE)A, 0x1a OP1 LDA(DE),
0x02 OP1 LD(BC)A, 0x0a OP1 LDA(BC),

View File

@ -1,4 +1,4 @@
PC ORG @ 0x12 + ! ( pushRS )
L4 BSET PC ORG @ 0x12 + ! ( pushRS )
IX INCss,
IX INCss,
0 IX+ L LDIXYr,

View File

@ -1,4 +1,4 @@
PC ORG @ 0x1e + ! ( chkPS )
L1 BSET PC ORG @ 0x1e + ! ( chkPS )
( Note that you only need to call this in words that push
back to PSP. If they don't, calling chkPS is redundant with
check in next )

View File

@ -3,7 +3,7 @@ PC ORG @ 0x1b + ! ( next )
we jump to current IP, but we also take care of increasing
it by 2 before jumping. )
( Before we continue: are stacks within bounds? )
0x1d BCALL, ( chkPS )
L1 @ ( chkPS ) BCALL,
( check RS )
IX PUSHqq, HL POPqq,
DE RS_ADDR LDddnn,

View File

@ -3,7 +3,7 @@ L1 BSET PC ORG @ 0x0f + ! ( compiledWord )
2. Set new IP to the second atom of the list
3. Execute the first atom of the list. )
IY PUSHqq, HL POPqq, ( <-- IP )
0x11 BCALL, ( 11 == pushRS )
L4 @ ( pushRS ) BCALL,
EXDEHL, ( HL points to PFA )
( While we inc, dereference into DE for execute call later. )
LDDE(HL),

Binary file not shown.