![]() |
Routines |
| Prev: 25250 | Up: Map | Next: 25330 |
|
Used by the routine at FindMessage.
Treats A as an index into Dictionary. Word 0 is empty. Every other word ends with bit 7 set.
|
||||
| ExpandToken | 25303 | LD HL,45500 | Point HL at Dictionary. | |
| 25306 | LD B,A | Copy the token number into B. | ||
| 25307 | OR A | Jump to ExpandToken_Character if it is token 0. | ||
| 25308 | JR Z,ExpandToken_Character | |||
| 25310 | DEC HL | The scan starts on the byte before the dictionary. | ||
|
Skip to the next word.
|
||||
| ExpandToken_Scan | 25311 | INC HL | Advance to the next character. | |
| 25312 | BIT 7,(HL) | Jump to ExpandToken_Next if bit 7 is set. | ||
| 25314 | JR NZ,ExpandToken_Next | |||
| 25316 | JR ExpandToken_Scan | Jump to ExpandToken_Scan. | ||
|
Count down to the requested word.
|
||||
| ExpandToken_Next | 25318 | DJNZ ExpandToken_Scan | Count down to the requested word. | |
|
Step onto the first character.
|
||||
| ExpandToken_Word | 25320 | INC HL | Step onto its first character. | |
|
Print this dictionary character.
|
||||
| ExpandToken_Character | 25321 | LD A,(HL) | Fetch this character. | |
| 25322 | CALL Capitalise | Call Capitalise. | ||
| 25325 | BIT 7,(HL) | Return if bit 7 is set. | ||
| 25327 | RET NZ | |||
| 25328 | JR ExpandToken_Word | Jump to ExpandToken_Word. | ||
| Prev: 25250 | Up: Map | Next: 25330 |