Prev: D564 Up: Map Next: D593
D589: Get Table Entry
Input
A The number of the entry
BC The address of the table
Output
HL The word from the table
Find the address of the entry.
GetTableEntry D589 LD L,A Put the number of the entry in HL.
D58A LD H,$00
D58C ADD HL,HL Double it.
D58D ADD HL,BC Add the address of the table.
Fetch the word.
D58E LD A,(HL) Fetch the low byte.
D58F INC HL Move on to the high byte.
D590 LD H,(HL) Fetch it into H.
D591 LD L,A Put the low byte in L and return.
D592 RET
View the equivalent code in;
Prev: D564 Up: Map Next: D593