Browse Source

z80: remove layers of indirection of find calls

pull/124/head
Virgil Dupras 4 years ago
parent
commit
42818d25be
9 changed files with 21 additions and 37 deletions
  1. +1
    -0
      blk/282
  2. +1
    -1
      blk/283
  3. +0
    -16
      blk/289
  4. +0
    -16
      blk/290
  5. +1
    -1
      blk/291
  6. +1
    -1
      blk/298
  7. +16
    -0
      blk/299
  8. +1
    -2
      blk/330
  9. BIN
      emul/forth.bin

+ 1
- 0
blk/282 View File

@@ -1,4 +1,5 @@
VARIABLE lblofl VARIABLE lblpushRS VARIABLE lblexec
VARIABLE lblfind
1 53 LOADR+




+ 1
- 1
blk/283 View File

@@ -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 )


+ 0
- 16
blk/289 View File

@@ -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. )


+ 0
- 16
blk/290 View File

@@ -1,16 +0,0 @@
EXDEHL,
HL L1 @ LDddnn,
0x03 BCALL, ( 03 == find )
0x33 BJP, ( 33 == execute )













+ 1
- 1
blk/291 View File

@@ -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. )


+ 1
- 1
blk/298 View File

@@ -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
- 0
blk/299 View File

@@ -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 )

+ 1
- 2
blk/330 View File

@@ -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 View File


Loading…
Cancel
Save