Prev: 44839 Up: Map Next: 44882
44856: Copy Schedule Entry
Used by the routine at MergeCharacterFlags.
Copies the ten-byte schedule entry into the character record the caller is building.
CopyScheduleEntry 44856 PUSH DE Save the source, the count and the pointer.
44857 PUSH BC
44858 PUSH HL
44859 LD B,10 Take a count of 10.
44861 PUSH IY Point HL at the schedule entry and keep A as the low byte of the offset.
44863 POP HL
44864 LD E,A
44865 LD D,0 Clear the high byte of the source.
44867 ADD HL,DE Advance the pointer by the source length.
44868 XOR A Clear A, ready to OR the 10 bytes together.
CopyScheduleEntry_Loop 44869 OR (HL) Or each entry into A and repeat from CopyScheduleEntry_Loop until B runs out.
44870 INC HL
44871 DJNZ CopyScheduleEntry_Loop
44873 POP HL Restore the pointer, the count and the source from the stack.
44874 POP BC
44875 POP DE
44876 AND A Clear the borrow so an empty entry returns as a failed match.
44877 RET Return.
Sets copy length 6.
CopyScheduleEntry_SixBytes 44878 LD C,6 Jump ahead to CopyBytes to set copy length 6.
44880 JR CopyBytes
Prev: 44839 Up: Map Next: 44882