![]() |
Routines |
| Prev: A4CD | Up: Map | Next: A51B |
|
Compares the following fields and records a match when they agree.
|
||||
| CompareFollowingFields | A4E0 | PUSH DE | Keep the schedule entry, then call ReadScriptPosition to compare location data. | |
| A4E1 | PUSH HL | |||
| A4E2 | PUSH IY | |||
| A4E4 | CALL ReadScriptPosition | |||
| A4E7 | JR NZ,CompareFollowingFields_0 | Go to CompareFollowingFields_0 if the script position does not match. | ||
| A4E9 | LD A,$01 | Take 01 store it at LocationMatchFlag and call ReadScriptPosition to compare location data. | ||
| A4EB | LD ($A02E),A | |||
| A4EE | CALL ReadScriptPosition | |||
| A4F1 | JR NZ,CompareFollowingFields_Next | Go to CompareFollowingFields_Next if the script position does not match. | ||
| A4F3 | CALL ReadScriptPosition | Go to CompareFollowingFields_0 if this field matches. | ||
| A4F6 | LD A,$00 | |||
| A4F8 | JR Z,CompareFollowingFields_0 | |||
| CompareFollowingFields_Next | A4FA | POP IY | Restore the schedule entry and the pointer from the stack, keeping a copy of each there. | |
| A4FC | POP HL | |||
| A4FD | PUSH HL | |||
| A4FE | PUSH IY | |||
| A500 | LD DE,$0004 | Take an offset of 0004. | ||
| A503 | ADD IY,DE | Step to the next schedule entry and step on two places, then call ReadScriptPosition to compare location data. | ||
| A505 | INC HL | |||
| A506 | INC HL | |||
| A507 | CALL ReadScriptPosition | |||
| A50A | JR NZ,CompareFollowingFields_0 | Go to CompareFollowingFields_0 if the script position does not match. | ||
| A50C | LD DE,$FFFC | Step the schedule entry back by 04 and call ReadScriptPosition to compare the location data. | ||
| A50F | ADD IY,DE | |||
| A511 | CALL ReadScriptPosition | |||
| A514 | LD A,$01 | Take 01. | ||
|
This entry point is used by the routine at CompareLocationData.
|
||||
| CompareFollowingFields_0 | A516 | POP IY | Restore the saved schedule entry, the saved pointer and the saved source from the stack. | |
| A518 | POP HL | |||
| A519 | POP DE | |||
| A51A | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: A4CD | Up: Map | Next: A51B |