Prev: 25245 Up: Map Next: 25303
25250: Find And Print Message
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 The next word is collected at WordBuffer.
25251 LD HL,23392
25254 LD (23449),HL
25257 POP HL
25258 LD A,(23439) Message 0 is already under HL.
25261 LD B,A
25262 OR A
25263 JR Z,FindMessage_Byte
25265 DEC HL The scan starts on the byte before the message.
FindMessage_Skip 25266 INC HL Look at the next byte.
25267 LD A,(HL)
25268 CP 94
25270 JR Z,FindMessage_Count
25272 CP 126 126 ends a message too, otherwise keep scanning.
25274 JR Z,FindMessage_Count
25276 JR FindMessage_Skip
FindMessage_Count 25278 DJNZ FindMessage_Skip Count down the messages and land on the chosen one.
25280 INC HL
FindMessage_Byte 25281 LD A,(HL) Remember this byte and expand it.
25282 LD (23440),HL
25285 CALL ExpandToken
25288 LD A,(23451) 126 ends the message.
25291 CP 126
25293 RET Z
25294 CP 94 94 ends the message.
25296 RET Z
25297 LD HL,(23440) Otherwise expand the next byte.
25300 INC HL
25301 JR FindMessage_Byte
Prev: 25245 Up: Map Next: 25303