Prev: AF27 Up: Map Next: AF52
AF38: Copy Schedule Entry
Used by the routine at MergeCharacterFlags.
Copies the ten-byte schedule entry into the character record the caller is building.
CopyScheduleEntry AF38 PUSH DE Save the source, the count and the pointer.
AF39 PUSH BC
AF3A PUSH HL
AF3B LD B,$0A Take a count of 0A.
AF3D PUSH IY Point HL at the schedule entry and keep A as the low byte of the offset.
AF3F POP HL
AF40 LD E,A
AF41 LD D,$00 Clear the high byte of the source.
AF43 ADD HL,DE Advance the pointer by the source length.
AF44 XOR A Clear A, ready to OR the 0A bytes together.
CopyScheduleEntry_Loop AF45 OR (HL) Or each entry into A and repeat from CopyScheduleEntry_Loop until B runs out.
AF46 INC HL
AF47 DJNZ CopyScheduleEntry_Loop
AF49 POP HL Restore the pointer, the count and the source from the stack.
AF4A POP BC
AF4B POP DE
AF4C AND A Clear the borrow so an empty entry returns as a failed match.
AF4D RET Return.
Sets copy length 06.
CopyScheduleEntry_SixBytes AF4E LD C,$06 Jump ahead to CopyBytes to set copy length 06.
AF50 JR CopyBytes
Prev: AF27 Up: Map Next: AF52