Prev: 41643 Up: Map Next: 41661
41649: Calculate Object Table Offset
Turns an object index into the address of its eight-byte runtime record at 33369.
Input
A Object index (0-based)
Output
HL Pointer to object entry in table
CalculateObjectTableOffset 41649 DEC A Count down one, store that in the low byte and clear the high byte.
41650 LD L,A
41651 LD H,0
41653 ADD HL,HL Multiply HL by 8.
41654 ADD HL,HL
41655 ADD HL,HL
41656 LD DE,33369 Use the object runtime table as the source.
41659 ADD HL,DE Advance the pointer by the source length.
41660 RET Return.
View the equivalent code in;
Prev: 41643 Up: Map Next: 41661