Prev: 29832 Up: Map Next: 29862
29843: Get Common Word
Used by the routine at PrintMessage.
Looks up one of the common words used by the message printer.
Input
A Letter reference
Output
DE Common word address
GetCommonWord 29843 SUB 96 Treat a letter at 96 or above as a common word.
29845 LD E,A Create offset for the dictionary look-up.
29846 LD D,0
29848 LD HL,44349 Point HL at common Words.
29851 ADD HL,DE Add to base address at CommonWords so that pointer is at the referenced word.
29852 ADD HL,DE
29853 LD E,(HL) Read the low byte of CommonWords.
29854 INC HL Step to the next letter.
29855 LD A,(HL) Read the next byte of the text.
29856 ADD A,80 Add 80 to A and store the result in D.
29858 LD D,A Keep the class token plus 80.
29859 JP PrintMessage_Token Jump back to PrintMessage_Token to print a dictionary token.
View the equivalent code in;
Prev: 29832 Up: Map Next: 29862