Prev: A2AB Up: Map Next: A2BD
A2B1: Calculate Object Table Offset
Turns an object index into the address of its eight-byte runtime record at 8259.
Input
A Object index (0-based)
Output
HL Pointer to object entry in table
CalculateObjectTableOffset A2B1 DEC A Count down one, store that in the low byte and clear the high byte.
A2B2 LD L,A
A2B3 LD H,$00
A2B5 ADD HL,HL Multiply HL by 08.
A2B6 ADD HL,HL
A2B7 ADD HL,HL
A2B8 LD DE,$8259 Use the object runtime table as the source.
A2BB ADD HL,DE Advance the pointer by the source length.
A2BC RET Return.
View the equivalent code in;
Prev: A2AB Up: Map Next: A2BD