Prev: 62A2 Up: Map Next: 62F2
62D7: 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 62D7 LD HL,$B1BC Point HL at Dictionary.
62DA LD B,A Copy the token number into B.
62DB OR A Jump to ExpandToken_Character if it is token 0.
62DC JR Z,ExpandToken_Character
62DE DEC HL The scan starts on the byte before the dictionary.
Skip to the next word.
ExpandToken_Scan 62DF INC HL Advance to the next character.
62E0 BIT 7,(HL) Jump to ExpandToken_Next if bit 7 is set.
62E2 JR NZ,ExpandToken_Next
62E4 JR ExpandToken_Scan Jump to ExpandToken_Scan.
Count down to the requested word.
ExpandToken_Next 62E6 DJNZ ExpandToken_Scan Count down to the requested word.
Step onto the first character.
ExpandToken_Word 62E8 INC HL Step onto its first character.
Print this dictionary character.
ExpandToken_Character 62E9 LD A,(HL) Fetch this character.
62EA CALL Capitalise Call Capitalise.
62ED BIT 7,(HL) Return if bit 7 is set.
62EF RET NZ
62F0 JR ExpandToken_Word Jump to ExpandToken_Word.
Prev: 62A2 Up: Map Next: 62F2