![]() |
Routines |
| Prev: A4E0 | Up: Map | Next: A536 |
|
Used by the routines at CompareLocationData and CompareFollowingFields.
Reads a pair of bytes and reports whether the low digit matches the script.
|
||||
| ReadScriptPosition | A51B | PUSH HL | Go to ReadScriptPosition_MoveOneByte if both bytes of this word are zero. | |
| A51C | LD A,(HL) | |||
| A51D | INC HL | |||
| A51E | OR (HL) | |||
| A51F | JR Z,ReadScriptPosition_MoveOneByte | |||
|
Does the low nibble of IY+01 differ from the script byte at HL?
|
||||
| A521 | LD A,(IY+$01) | Jump to ReadScriptPosition_MoveOneByte when the low nibble of IY+01 differs from the script byte at HL. | ||
| A524 | XOR (HL) | |||
| A525 | AND $0F | |||
| A527 | JR NZ,ReadScriptPosition_MoveOneByte | |||
| A529 | DEC HL | Step back one script byte and compare it with this schedule field. | ||
| A52A | LD A,(HL) | |||
| A52B | CP (IY+$00) | |||
| ReadScriptPosition_MoveOneByte | A52E | POP HL | Move one byte onward and restore the pointer saved for this step. | |
| A52F | INC HL | |||
| A530 | INC HL | Advance through the script. | ||
| A531 | INC IY | Step to the next field of the schedule entry. | ||
| A533 | INC IY | Step to the next field of the schedule entry. | ||
| A535 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: A4E0 | Up: Map | Next: A536 |