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 Token 0 is the first dictionary word.
62DA LD B,A
62DB OR A
62DC JR Z,ExpandToken_Character
62DE DEC HL The scan starts on the byte before the dictionary.
ExpandToken_Scan 62DF INC HL Skip to the end of one word. Bit 7 marks it.
62E0 BIT 7,(HL)
62E2 JR NZ,ExpandToken_Next
62E4 JR ExpandToken_Scan
ExpandToken_Next 62E6 DJNZ ExpandToken_Scan Count down to the requested word.
ExpandToken_Word 62E8 INC HL Step onto its first character.
ExpandToken_Character 62E9 LD A,(HL) Print this character.
62EA CALL Capitalise
62ED BIT 7,(HL) Bit 7 ends the word.
62EF RET NZ
62F0 JR ExpandToken_Word
Prev: 62A2 Up: Map Next: 62F2