Prev: 42208 Up: Map Next: 42294
42267: Read The Script Position
Used by the routines at CompareLocationData and CompareFollowingFields.
Reads a pair of bytes and reports whether the low digit matches the script.
ReadScriptPosition 42267 PUSH HL Go to ReadScriptPosition_MoveOneByte if both bytes of this word are zero.
42268 LD A,(HL)
42269 INC HL
42270 OR (HL)
42271 JR Z,ReadScriptPosition_MoveOneByte
Does the low nibble of IY+1 differ from the script byte at HL?
42273 LD A,(IY+1) Jump to ReadScriptPosition_MoveOneByte when the low nibble of IY+1 differs from the script byte at HL.
42276 XOR (HL)
42277 AND 15
42279 JR NZ,ReadScriptPosition_MoveOneByte
42281 DEC HL Step back one script byte and compare it with this schedule field.
42282 LD A,(HL)
42283 CP (IY+0)
ReadScriptPosition_MoveOneByte 42286 POP HL Move one byte onward and restore the pointer saved for this step.
42287 INC HL
42288 INC HL Advance through the script.
42289 INC IY Step to the next field of the schedule entry.
42291 INC IY Step to the next field of the schedule entry.
42293 RET Return.
View the equivalent code in;
Prev: 42208 Up: Map Next: 42294