mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 12:18:07 +11:00
z80: remove layers of indirection of find calls
This commit is contained in:
parent
76e698157c
commit
42818d25be
1
blk/282
1
blk/282
@ -1,4 +1,5 @@
|
||||
VARIABLE lblofl VARIABLE lblpushRS VARIABLE lblexec
|
||||
VARIABLE lblfind
|
||||
1 53 LOADR+
|
||||
|
||||
|
||||
|
2
blk/283
2
blk/283
@ -1,5 +1,5 @@
|
||||
H@ ORG !
|
||||
0 JPnn, ( 00, main ) 0 JPnn, ( 03, find )
|
||||
0 JPnn, ( 00, main ) NOP, NOP, NOP, ( 03, unused )
|
||||
NOP, NOP, ( 06, unused ) NOP, NOP, ( 08, LATEST )
|
||||
NOP, NOP, NOP, NOP, NOP, NOP, NOP, ( 0a, unused )
|
||||
0 JPnn, ( 11, pushRS ) 0 JPnn, ( 14, popRS )
|
||||
|
16
blk/289
16
blk/289
@ -1,16 +0,0 @@
|
||||
( Name of BOOT word )
|
||||
L1 BSET 4 A, 'B' A, 'O' A, 'O' A, 'T' A,
|
||||
|
||||
PC ORG @ 1 + ! ( main )
|
||||
( STACK OVERFLOW PROTECTION: See B76 )
|
||||
SP PS_ADDR LDddnn,
|
||||
IX RS_ADDR LDddnn,
|
||||
( HERE begins at RAMEND )
|
||||
HL RAMSTART 0x80 + LDddnn,
|
||||
RAMSTART 0x04 + LD(nn)HL, ( RAM+04 == HERE )
|
||||
( LATEST is a label to the latest entry of the dict. It is
|
||||
written at offset 0x08 by the process or person building
|
||||
Forth. )
|
||||
BIN( @ 0x08 + LDHL(nn),
|
||||
RAMSTART 0x02 + LD(nn)HL, ( RAM+02 == CURRENT cont. )
|
||||
|
16
blk/290
16
blk/290
@ -1,16 +0,0 @@
|
||||
EXDEHL,
|
||||
HL L1 @ LDddnn,
|
||||
0x03 BCALL, ( 03 == find )
|
||||
0x33 BJP, ( 33 == execute )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
2
blk/291
2
blk/291
@ -1,4 +1,4 @@
|
||||
PC ORG @ 4 + ! ( find )
|
||||
lblfind BSET
|
||||
( Find the entry corresponding to word name where (HL) points
|
||||
to in dictionary having its tip at DE and sets DE to point
|
||||
to that entry. Z if found, NZ if not. )
|
||||
|
2
blk/298
2
blk/298
@ -2,7 +2,7 @@
|
||||
lblofl BSET ( abortUnderflow )
|
||||
HL PC 7 - LDddnn,
|
||||
DE RAMSTART 0x02 + LDdd(nn), ( RAM+02 == CURRENT )
|
||||
0x03 BCALL, ( find )
|
||||
lblfind @ CALLnn,
|
||||
0x33 BJP, ( 33 == execute )
|
||||
|
||||
|
||||
|
16
blk/299
16
blk/299
@ -0,0 +1,16 @@
|
||||
L1 BSET 4 A, 'B' A, 'O' A, 'O' A, 'T' A,
|
||||
PC ORG @ 1 + ! ( main )
|
||||
( STACK OVERFLOW PROTECTION: See B76 )
|
||||
SP PS_ADDR LDddnn, IX RS_ADDR LDddnn,
|
||||
( HERE begins at RAMEND )
|
||||
HL RAMSTART 0x80 + LDddnn,
|
||||
RAMSTART 0x04 + LD(nn)HL, ( RAM+04 == HERE )
|
||||
( LATEST is a label to the latest entry of the dict. It is
|
||||
written at offset 0x08 by the process or person building
|
||||
Forth. )
|
||||
BIN( @ 0x08 + LDHL(nn),
|
||||
RAMSTART 0x02 ( CURRENT ) + LD(nn)HL,
|
||||
EXDEHL,
|
||||
HL L1 @ LDddnn,
|
||||
lblfind @ CALLnn,
|
||||
0x33 BJP, ( 33 == execute )
|
3
blk/330
3
blk/330
@ -2,8 +2,7 @@ CODE _find ( cur w -- a f )
|
||||
HL POPqq, ( w )
|
||||
DE POPqq, ( cur )
|
||||
chkPS,
|
||||
( 3 == find )
|
||||
3 BCALL,
|
||||
lblfind @ CALLnn,
|
||||
IFNZ,
|
||||
( not found )
|
||||
HL PUSHqq,
|
||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user