Prev: 25250 Up: Map Next: 25330
25303: Expand Dictionary Word
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 Token 0 is the first dictionary word.
25306 LD B,A
25307 OR A
25308 JR Z,ExpandToken_Character
25310 DEC HL The scan starts on the byte before the dictionary.
ExpandToken_Scan 25311 INC HL Skip to the end of one word. Bit 7 marks it.
25312 BIT 7,(HL)
25314 JR NZ,ExpandToken_Next
25316 JR ExpandToken_Scan
ExpandToken_Next 25318 DJNZ ExpandToken_Scan Count down to the requested word.
ExpandToken_Word 25320 INC HL Step onto its first character.
ExpandToken_Character 25321 LD A,(HL) Print this character.
25322 CALL Capitalise
25325 BIT 7,(HL) Bit 7 ends the word.
25327 RET NZ
25328 JR ExpandToken_Word
Prev: 25250 Up: Map Next: 25330