Prev: 54628 Up: Map Next: 54675
54665: 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 54665 LD L,A Put the number of the entry in HL.
54666 LD H,0
54668 ADD HL,HL Double it.
54669 ADD HL,BC Add the address of the table.
Fetch the word.
54670 LD A,(HL) Fetch the low byte.
54671 INC HL Move on to the high byte.
54672 LD H,(HL) Fetch it into H.
54673 LD L,A Put the low byte in L and return.
54674 RET
View the equivalent code in;
Prev: 54628 Up: Map Next: 54675