Prev: 47210 Up: Map Next: 47374
47274: Read The Pointer At The First Display
Used by the routine at FollowLinkPointer.
Reads the word at 47208 and stores it in the word at ActiveTextPointer.
ReadPointerFirstDisplay 47274 LD HL,(47208) Read the word at 47208, store it in the word at ActiveTextPointer and clear A.
47277 LD (41003),HL
47280 XOR A
47281 LD (40996),A Clear the command mode at 40996.
47284 LD HL,(40944) Read the first display link and clear the pointer.
47287 PUSH HL
47288 LD HL,0
47291 LD (40944),HL Store the pointer in the first display link.
ReadPointerFirstDisplay_PrepareCharacterDisplay 47294 CALL PrepareCharacterForDisplay Go to ReadPointerFirstDisplay_ObjectProcessingSource if PrepareCharacterForDisplay returns zero.
47297 JR Z,ReadPointerFirstDisplay_ObjectProcessingSource
47299 CP 2 Jump ahead to ReadPointerFirstDisplay_ReadsFirstDisplay if it is not 2.
47301 JR NZ,ReadPointerFirstDisplay_ReadsFirstDisplay
ReadPointerFirstDisplay_ObjectProcessingSource 47303 LD HL,(41003) Read the word at ActiveTextPointer.
47306 LD A,(HL) Jump back to ReadPointerFirstDisplay_PrepareCharacterDisplay while the high nibble is not 192.
47307 AND 240
47309 CP 192
47311 JR NZ,ReadPointerFirstDisplay_PrepareCharacterDisplay
47313 LD (HL),144 Use 8 for the character code, then call AllocateMemory to allocate memory.
47315 LD A,8
47317 CALL AllocateMemory
47320 LD HL,(40942) Read the list head and make this record the new head.
47323 LD (40942),IX
47327 LD (IX-2),L Store the low byte of the old list head in the link word ahead of this record.
47330 LD (IX-1),H Store the high byte of the old list head in the link word ahead of this record, and read the word at 40942+2.
47333 LD HL,(40944)
47336 LD (IX+5),L Store the low byte of the first display link at offset 5.
47339 LD (IX+6),H Store the high byte of that link at offset 6 and keep the stacked pointer as the first display link.
47342 POP HL
47343 LD (40944),HL
47346 XOR A Clear the moved marker and read the room display parameter.
47347 LD (IX+1),A
47350 LD A,(41012)
47353 LD (IX+0),A Store the record's flag byte.
47356 LD A,(40996) Copy 40996 to offset 7.
47359 LD (IX+7),A
47362 XOR A
47363 RET Return.
Reads the first display link, then stores the saved pointer back into that link.
ReadPointerFirstDisplay_ReadsFirstDisplay 47364 PUSH AF Call ReadFirstDisplayLink to read the first display link.
47365 CALL ReadFirstDisplayLink
47368 POP AF
47369 POP HL
47370 LD (40944),HL Store the pointer in the first display link.
47373 RET Return.
Prev: 47210 Up: Map Next: 47374