1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 13:18:05 +11:00

z80: inline all uses of pushRS/popRS

I'm trying to move stuff around and it simplifies things. Will make
a lot more sense to inline when BC replaces IY.
This commit is contained in:
Virgil Dupras 2020-07-05 21:54:01 -04:00
parent ebf47a2ab5
commit 3ea221d0eb
6 changed files with 15 additions and 23 deletions

View File

@ -1,2 +1 @@
VARIABLE lblofl VARIABLE lblpushRS VARIABLE lblpopRS
VARIABLE lblexec VARIABLE lblfind
VARIABLE lblofl VARIABLE lblexec VARIABLE lblfind

11
blk/297
View File

@ -1,11 +0,0 @@
lblpushRS BSET
IX INCd, IX INCd,
0 IX+ L LDIXYr,
1 IX+ H LDIXYr,
RET,
lblpopRS BSET
L 0 IX+ LDrIXY,
H 1 IX+ LDrIXY,
IX DECd, IX DECd,
RET,

View File

@ -3,7 +3,9 @@
2. Set new IP to the second atom of the list
3. Execute the first atom of the list. )
IY PUSH, HL POP, ( <-- IP )
lblpushRS @ ( pushRS ) CALL,
IX INCd, IX INCd,
0 IX+ L LDIXYr,
1 IX+ H LDIXYr,
EXDEHL, ( HL points to PFA )
( While we inc, dereference into DE for execute call later. )
LDDE(HL),

View File

@ -6,6 +6,8 @@ CODE EXECUTE
CODE EXIT
PC ORG @ 0x0d + ! ( stable ABI JP )
lblpopRS @ CALL,
L 0 IX+ LDrIXY,
H 1 IX+ LDrIXY,
IX DECd, IX DECd,
HL PUSH, IY POP, ( --> IP )
JPNEXT,

View File

@ -8,4 +8,3 @@ PC ORG @ 0x25 + ! ( stable ABI JP )
IY INCd, IY INCd,
DE PUSH,
;CODE
( END OF STABLE ABI )

15
blk/326
View File

@ -1,15 +1,16 @@
CODE >R
HL POP, lblpushRS @ CALL,
HL POP, IX INCd, IX INCd, 0 IX+ L LDIXYr, 1 IX+ H LDIXYr,
;CODE
CODE R>
lblpopRS @ CALL, HL PUSH,
L 0 IX+ LDrIXY, H 1 IX+ LDrIXY, IX DECd, IX DECd, HL PUSH,
;CODE
CODE 2>R
PC ORG @ 0x35 + ! ( stable ABI JP )
CODE 2>R PC ORG @ 0x35 + ! ( stable ABI JP )
DE POP, HL POP,
lblpushRS @ CALL, EXDEHL, lblpushRS @ CALL,
IX INCd, IX INCd, 0 IX+ L LDIXYr, 1 IX+ H LDIXYr,
IX INCd, IX INCd, 0 IX+ E LDIXYr, 1 IX+ D LDIXYr,
;CODE
CODE 2R>
lblpopRS @ CALL, EXDEHL, lblpopRS @ CALL,
HL PUSH, DE PUSH,
L 0 IX+ LDrIXY, H 1 IX+ LDrIXY, IX DECd, IX DECd,
E 0 IX+ LDrIXY, D 1 IX+ LDrIXY, IX DECd, IX DECd,
DE PUSH, HL PUSH,
;CODE