Spectrum ROM | Routines |
Prev: 03131 | Up: Map |
Used by the routine at PO_MSG.
The subroutine returns with the DE register pair pointing to the initial character of the required entry and the carry flag reset if a 'leading space' is to be considered.
|
|||||||
PO_SEARCH | 03137 | PUSH AF | Save the 'entry number'. | ||||
03138 | EX DE,HL | HL now holds the base address. | |||||
03139 | INC A | Compensate for the 'DEC A' below. | |||||
PO_STEP | 03140 | BIT 7,(HL) | Wait for an 'inverted character'. | ||||
03142 | INC HL | ||||||
03143 | JR Z,PO_STEP | ||||||
03145 | DEC A | Count through the entries until the correct one is found. | |||||
03146 | JR NZ,PO_STEP | ||||||
03148 | EX DE,HL | DE points to the initial character. | |||||
03149 | POP AF | Fetch the 'entry number' and return with carry set for the first thirty two entries. | |||||
03150 | CP 32 | ||||||
03152 | RET C | ||||||
03153 | LD A,(DE) | However if the intial character is a letter then a leading space may be needed. | |||||
03154 | SUB "A" | ||||||
03156 | RET |
Prev: 03131 | Up: Map |