Prev: A280 Up: Map Next: A314
A305: 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 A305 LD D,$00 Multiply the given index by 02 and store the result in DE.
A307 SLA E
A309 RL D
A30B ADD IX,DE Add DE to the base table address.
A30D LD L,(IX+$00) Fetch the relevant table address and store it in HL.
A310 LD H,(IX+$01)
A313 RET Return.
View the equivalent code in;
Prev: A280 Up: Map Next: A314