1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 19:28:06 +11:00

z80: move lbluflw code around

with uflw checks not being in next anymore, we can save ourselves
a forward jump.
This commit is contained in:
Virgil Dupras 2020-08-08 08:19:31 -04:00
parent d1de99d8c9
commit 5adbf88591
6 changed files with 8 additions and 8 deletions

View File

@ -1 +1 @@
VARIABLE lblofl VARIABLE lblexec VARIABLE lbluflw VARIABLE lblexec

View File

@ -1,3 +0,0 @@
lblofl BSET ( abortUnderflow )
DE BIN( @ 0x06 ( uflw ) + LDdd(n),
JR, L2 FWR ( execute, B287 )

View File

@ -8,7 +8,7 @@ lblnext BSET PC ORG @ 0x1b + ! ( next )
IFNC, ( SP <= IX? overflow ) IFNC, ( SP <= IX? overflow )
SP PS_ADDR LDdn, IX RS_ADDR LDdn, SP PS_ADDR LDdn, IX RS_ADDR LDdn,
DE BIN( @ 0x13 ( oflw ) + LDdd(n), DE BIN( @ 0x13 ( oflw ) + LDdd(n),
JR, L3 FWR ( execute, B287 ) JR, L2 FWR ( execute, B287 )
THEN, THEN,
LDA(BC), E A LDrr, BC INCd, LDA(BC), E A LDrr, BC INCd,
LDA(BC), D A LDrr, BC INCd, LDA(BC), D A LDrr, BC INCd,

View File

@ -1,4 +1,4 @@
lblexec BSET L1 FSET ( B284 ) L2 FSET ( B285 ) L3 FSET ( B286 ) lblexec BSET L1 FSET ( B284 ) L2 FSET ( B286 )
( DE -> wordref ) ( DE -> wordref )
( When we have a BIN( offset, we need to adjust stable ( When we have a BIN( offset, we need to adjust stable
ABI offsets. ) ABI offsets. )

View File

@ -1,3 +1,6 @@
lbluflw BSET ( abortUnderflow )
DE BIN( @ 0x06 ( uflw ) + LDdd(n),
JR, lblexec BWR
lblchkPS BSET ( chkPS ) lblchkPS BSET ( chkPS )
( Note that you only need to call this in words that push ( Note that you only need to call this in words that push
back to PSP. If they don't, calling chkPS is redundant with back to PSP. If they don't, calling chkPS is redundant with
@ -9,4 +12,4 @@ lblchkPS BSET ( chkPS )
SP SUBHLd, SP SUBHLd,
EXX, EXX,
CNC RETc, ( PS_ADDR >= SP? good ) CNC RETc, ( PS_ADDR >= SP? good )
JR, lblofl BWR ( abortUnderflow-B298 ) JR, lbluflw BWR

View File

@ -10,6 +10,6 @@ CODE PICK EXX, ( protect BC )
EXDEHL, EXDEHL,
HL PS_ADDR LDdn, HL PS_ADDR LDdn,
DE SUBHLd, DE SUBHLd,
IFC, EXX, lblofl @ JP, THEN, IFC, EXX, lbluflw @ JP, THEN,
BC PUSH, BC PUSH,
EXX, ( unprotect BC ) ;CODE EXX, ( unprotect BC ) ;CODE