Prev: D564 Up: Map Next: D593
D589: Look up a word in a table
HL = the word at BC + 2 * A. As Pentagram's TABLE_WORD.
Input
A the index
BC the table
Output
HL the word
TABLE_WORD D589 LD L,A HL = BC + 2 * A
D58A LD H,$00
D58C ADD HL,HL
D58D ADD HL,BC
D58E LD A,(HL) The word there
D58F INC HL
D590 LD H,(HL)
D591 LD L,A
D592 RET
Prev: D564 Up: Map Next: D593