Prev: 41600 Up: Map Next: 41748
41733: Get Table Entry
Retrieves an address from a table using a given index.
Input
E Index of item
IX Base table address
Output
HL Address from the relevant table entry
IX Address of the table entry
GetTableEntry 41733 LD D,0 Multiply the given index by 2 and store the result in DE.
41735 SLA E
41737 RL D
41739 ADD IX,DE Add DE to the base table address.
41741 LD L,(IX+0) Fetch the relevant table address and store it in HL.
41744 LD H,(IX+1)
41747 RET Return.
View the equivalent code in;
Prev: 41600 Up: Map Next: 41748