![]() |
Routines |
| Prev: 25245 | Up: Map | Next: 25303 |
|
Used by the routine at PrintMessage.
Skips earlier messages by counting 94 and 126 terminators, then expands each byte as a dictionary word.
|
||||
| FindMessage | 25250 | PUSH HL | Point the next word at WordBuffer (using the stack). | |
| 25251 | LD HL,23392 | |||
| 25254 | LD (23449),HL | |||
| 25257 | POP HL | |||
| 25258 | LD A,(23439) | Fetch MessageNumber into B. | ||
| 25261 | LD B,A | |||
| 25262 | OR A | Jump to FindMessage_Byte if it is message 0. | ||
| 25263 | JR Z,FindMessage_Byte | |||
| 25265 | DEC HL | The scan starts on the byte before the message. | ||
|
Skip earlier messages.
|
||||
| FindMessage_Skip | 25266 | INC HL | Advance to the next byte. | |
| 25267 | LD A,(HL) | |||
| 25268 | CP 94 | Jump to FindMessage_Count if it is 94. | ||
| 25270 | JR Z,FindMessage_Count | |||
| 25272 | CP 126 | Jump to FindMessage_Count if it is 126. | ||
| 25274 | JR Z,FindMessage_Count | |||
| 25276 | JR FindMessage_Skip | Jump to FindMessage_Skip. | ||
|
Count down to the chosen message.
|
||||
| FindMessage_Count | 25278 | DJNZ FindMessage_Skip | Jump to FindMessage_Skip until this is the chosen message. | |
| 25280 | INC HL | Step onto the chosen message. | ||
|
Expand this message byte.
|
||||
| FindMessage_Byte | 25281 | LD A,(HL) | Fetch this byte. | |
| 25282 | LD (23440),HL | Write HL to *MessagePointer. | ||
| 25285 | CALL ExpandToken | Call ExpandToken. | ||
| 25288 | LD A,(23451) | Fetch LastCharacter. | ||
| 25291 | CP 126 | Return if it is 126. | ||
| 25293 | RET Z | |||
| 25294 | CP 94 | 94 ends the message. | ||
| 25296 | RET Z | |||
| 25297 | LD HL,(23440) | Fetch MessagePointer. | ||
| 25300 | INC HL | Advance it. | ||
| 25301 | JR FindMessage_Byte | Jump to FindMessage_Byte. | ||
| Prev: 25245 | Up: Map | Next: 25303 |