Prev: 53788 Up: Map Next: 53815
53796: Fetch Location Data Pointer
Input
A Room ID
Output
IX Pointer to location data
FetchLocationDataPointer 53796 PUSH DE Use the locations at Table_Locations.
53797 LD DE,33803
53800 PUSH HL
53801 LD L,A
53802 LD H,0
53804 ADD HL,HL Double the room id, because each location entry is a word.
53805 ADD HL,DE Add the base table address to the offset to point to the requested room address.
53806 LD E,(HL) Read the location address for this room.
53807 INC HL
53808 LD D,(HL)
53809 PUSH DE
53810 POP IX
53812 POP HL Restore the saved pointer and the saved source from the stack.
53813 POP DE
53814 RET Return.
View the equivalent code in;
Prev: 53788 Up: Map Next: 53815