Prev: 41191 Up: Map Next: 41220
41207: Fetch Object Pointer From Stack
Input
IX Object pointer (on stack)
Output
IX Object pointer
HL Zero if object pointer was zero, otherwise preserved
This will be restored back into HL by the end of the routine.
FetchObjectPointerFromStack 41207 PUSH HL Stash HL on the stack temporarily.
41208 LD L,(IX-2) L=*IX-2.
41211 LD H,(IX-1) H=*IX-1.
41214 LD A,L Is HL zero?
41215 OR H
Pretty clever way of using the stack here.
41216 EX (SP),HL Swap the *SP with the object pointer, restoring HL to the original value.
41217 POP IX Restore the object pointer into IX (from the stack).
41219 RET Return.
Prev: 41191 Up: Map Next: 41220