mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-30 19:48:06 +11:00
z80: use named labels for boot routines
The usage of numerotated labels for this was becoming severly confusing.
This commit is contained in:
parent
eed817b517
commit
eba83fa9a9
5
blk/243
5
blk/243
@ -3,10 +3,9 @@
|
|||||||
: BJP, BIN( @ + JPnn, ;
|
: BJP, BIN( @ + JPnn, ;
|
||||||
: BJPcc, BIN( @ + JPccnn, ;
|
: BJPcc, BIN( @ + JPccnn, ;
|
||||||
|
|
||||||
|
VARIABLE lblchkPS
|
||||||
|
: chkPS, lblchkPS @ CALLnn, ; ( chkPS, B305 )
|
||||||
: JPNEXT, 26 BJP, ; ( 26 == next )
|
: JPNEXT, 26 BJP, ; ( 26 == next )
|
||||||
|
|
||||||
: chkPS, L4 @ CALLnn, ; ( chkPS, B305 )
|
|
||||||
|
|
||||||
: CODE ( same as CREATE, but with native word )
|
: CODE ( same as CREATE, but with native word )
|
||||||
(entry) 0 C, ( 0 == native ) ;
|
(entry) 0 C, ( 0 == native ) ;
|
||||||
: ;CODE JPNEXT, ;
|
: ;CODE JPNEXT, ;
|
||||||
|
6
blk/282
6
blk/282
@ -1,3 +1,4 @@
|
|||||||
|
VARIABLE lblofl VARIABLE lblpushRS VARIABLE lblexec
|
||||||
1 53 LOADR+
|
1 53 LOADR+
|
||||||
|
|
||||||
|
|
||||||
@ -9,8 +10,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2
blk/297
2
blk/297
@ -1,4 +1,4 @@
|
|||||||
L4 BSET PC ORG @ 0x12 + ! ( pushRS )
|
lblpushRS BSET PC ORG @ 0x12 + ! ( pushRS )
|
||||||
IX INCss,
|
IX INCss,
|
||||||
IX INCss,
|
IX INCss,
|
||||||
0 IX+ L LDIXYr,
|
0 IX+ L LDIXYr,
|
||||||
|
2
blk/298
2
blk/298
@ -1,5 +1,5 @@
|
|||||||
6 A, '(' A, 'u' A, 'f' A, 'l' A, 'w' A, ')' A,
|
6 A, '(' A, 'u' A, 'f' A, 'l' A, 'w' A, ')' A,
|
||||||
L2 BSET ( abortUnderflow )
|
lblofl BSET ( abortUnderflow )
|
||||||
HL PC 7 - LDddnn,
|
HL PC 7 - LDddnn,
|
||||||
DE RAMSTART 0x02 + LDdd(nn), ( RAM+02 == CURRENT )
|
DE RAMSTART 0x02 + LDdd(nn), ( RAM+02 == CURRENT )
|
||||||
0x03 BCALL, ( find )
|
0x03 BCALL, ( find )
|
||||||
|
4
blk/300
4
blk/300
@ -5,11 +5,11 @@ PC ORG @ 0x1b + ! ( next )
|
|||||||
( Before we continue: are stacks within bounds? )
|
( Before we continue: are stacks within bounds? )
|
||||||
( PS ) HL PS_ADDR LDddnn,
|
( PS ) HL PS_ADDR LDddnn,
|
||||||
SP SUBHLss,
|
SP SUBHLss,
|
||||||
JRC, L2 BWR ( abortUnderflow-B298 )
|
JRC, lblofl BWR ( abortUnderflow-B298 )
|
||||||
( RS ) IX PUSHqq, HL POPqq,
|
( RS ) IX PUSHqq, HL POPqq,
|
||||||
DE RS_ADDR LDddnn,
|
DE RS_ADDR LDddnn,
|
||||||
DE SUBHLss,
|
DE SUBHLss,
|
||||||
JRC, L2 BWR ( IX < RS_ADDR? abortUnderflow-B298 )
|
JRC, lblofl BWR ( IX < RS_ADDR? abortUnderflow-B298 )
|
||||||
E 0 IY+ LDrIXY,
|
E 0 IY+ LDrIXY,
|
||||||
D 1 IY+ LDrIXY,
|
D 1 IY+ LDrIXY,
|
||||||
IY INCss, IY INCss,
|
IY INCss, IY INCss,
|
||||||
|
2
blk/301
2
blk/301
@ -1,4 +1,4 @@
|
|||||||
L3 BSET PC ORG @ 0x34 + ! ( execute. DE -> wordref )
|
lblexec BSET PC ORG @ 0x34 + ! ( execute. DE -> wordref )
|
||||||
( We don't apply BIN( reliably on stable ABI stuff, we
|
( We don't apply BIN( reliably on stable ABI stuff, we
|
||||||
might need to adjust addr. Ugly, but well... )
|
might need to adjust addr. Ugly, but well... )
|
||||||
BIN( @ [IF]
|
BIN( @ [IF]
|
||||||
|
4
blk/303
4
blk/303
@ -3,13 +3,13 @@
|
|||||||
2. Set new IP to the second atom of the list
|
2. Set new IP to the second atom of the list
|
||||||
3. Execute the first atom of the list. )
|
3. Execute the first atom of the list. )
|
||||||
IY PUSHqq, HL POPqq, ( <-- IP )
|
IY PUSHqq, HL POPqq, ( <-- IP )
|
||||||
L4 @ ( pushRS ) CALLnn,
|
lblpushRS @ ( pushRS ) CALLnn,
|
||||||
EXDEHL, ( HL points to PFA )
|
EXDEHL, ( HL points to PFA )
|
||||||
( While we inc, dereference into DE for execute call later. )
|
( While we inc, dereference into DE for execute call later. )
|
||||||
LDDE(HL),
|
LDDE(HL),
|
||||||
HL INCss,
|
HL INCss,
|
||||||
HL PUSHqq, IY POPqq, ( --> IP )
|
HL PUSHqq, IY POPqq, ( --> IP )
|
||||||
JR, L3 BWR ( execute-B301 )
|
JR, lblexec BWR ( execute-B301 )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
4
blk/305
4
blk/305
@ -1,4 +1,4 @@
|
|||||||
L4 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
|
||||||
check in next )
|
check in next )
|
||||||
@ -9,7 +9,7 @@ L4 BSET ( chkPS )
|
|||||||
SP SUBHLss,
|
SP SUBHLss,
|
||||||
EXX,
|
EXX,
|
||||||
CNC RETcc, ( PS_ADDR >= SP? good )
|
CNC RETcc, ( PS_ADDR >= SP? good )
|
||||||
JR, L2 BWR ( abortUnderflow-B298 )
|
JR, lblofl BWR ( abortUnderflow-B298 )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2
blk/306
2
blk/306
@ -5,7 +5,7 @@
|
|||||||
CODE EXECUTE
|
CODE EXECUTE
|
||||||
DE POPqq,
|
DE POPqq,
|
||||||
chkPS,
|
chkPS,
|
||||||
JR, L3 BWR ( execute-B301 )
|
JR, lblexec BWR ( execute-B301 )
|
||||||
|
|
||||||
( a b c -- b c a )
|
( a b c -- b c a )
|
||||||
CODE ROT
|
CODE ROT
|
||||||
|
Loading…
Reference in New Issue
Block a user