Prev: 41391 Up: Map Next: 41484
41415: Process Memory Entry
Follows one linked record, stores its link, and clears the marker after that link.
ProcessMemoryEntry 41415 PUSH HL Save the pointer, the source and the character record.
41416 PUSH DE
41417 PUSH IX
41419 POP HL Step back over the block header and point IX at the free-space list (40931).
41420 DEC HL
41421 DEC HL
41422 DEC HL
41423 LD IX,40931
ProcessMemoryEntry_Loop 41427 LD E,(IX+0) Read the record's flag byte and read the moved marker.
41430 LD D,(IX+1)
41433 LD A,D Jump ahead to ProcessMemoryEntry_Next if the pointer is zero.
41434 OR E
41435 JR Z,ProcessMemoryEntry_Next
41437 PUSH HL Compare HL with DE, keeping a copy of HL.
41438 AND A
41439 SBC HL,DE
41441 POP HL Restore HL from the stack.
41442 JR C,ProcessMemoryEntry_Next Jump ahead to ProcessMemoryEntry_Next if HL was below DE.
41444 INC DE Step the source on two bytes, copy it into the record, and go to ProcessMemoryEntry_Loop.
41445 INC DE
41446 PUSH DE
41447 POP IX
41449 JR ProcessMemoryEntry_Loop
Stores the link in the record flag, clears the marker after that link, and stores the source address.
ProcessMemoryEntry_Next 41451 LD (IX+0),L Store the record's flag byte and store the moved marker.
41454 LD (IX+1),H
41457 INC HL
41458 LD (HL),0 Clear the marker after the link.
41460 INC HL Call CalculatePointerOffset to calculate pointer offset.
41461 LD (HL),E
41462 INC HL
41463 LD (HL),D
41464 CALL CalculatePointerOffset
41467 JR Z,ProcessMemoryEntry_Call Go to ProcessMemoryEntry_Call if the offset meets this pointer.
41469 LD L,(IX+0) Read the link word.
41472 LD H,(IX+1)
41475 PUSH HL Copy the link word from HL into IX.
41476 POP IX
ProcessMemoryEntry_Call 41478 CALL CalculatePointerOffset Call CalculatePointerOffset to calculate pointer offset.
41481 POP DE
41482 POP HL
41483 RET Return.
Prev: 41391 Up: Map Next: 41484