![]() |
Routines |
| Prev: 54385 | Up: Map | Next: 54421 |
|
Used by the routine at FindObjectByFieldOne.
Writes the field number into the search instruction, then walks the object records for a match.
|
||||
| FindObjectByField | 54388 | LD (54413),A | Write the field number into the displacement of the instruction at 54411. | |
| 54391 | POP AF | |||
| 54392 | PUSH BC | |||
| 54393 | PUSH IY | Call FetchCurrentCharacterLocation to fetch current character location. | ||
| 54395 | LD B,A | |||
| 54396 | PUSH DE | |||
| 54397 | CALL FetchCurrentCharacterLocation | |||
| 54400 | LD DE,6 | Step to the next record. | ||
| 54403 | ADD IX,DE | |||
| 54405 | POP DE | |||
| FindObjectByField_Loop | 54406 | CALL FetchNextObject | Go to FindObjectByField_Next if the next object id is 255. | |
| 54409 | JR Z,FindObjectByField_Next | |||
|
FindObjectByField writes 1 or 2 into the displacement of this instruction.
|
||||
| 54411 | LD A,(IX+2) | Compare field 2 (modified by FindObjectByField) of this object with the value wanted, and keep searching if it differs. | ||
| 54414 | CP B | |||
| 54415 | JR NZ,FindObjectByField_Loop | |||
| FindObjectByField_Next | 54417 | POP IY | Restore the saved schedule entry and the saved count from the stack. | |
| 54419 | POP BC | |||
| 54420 | RET | Return. | ||
| Prev: 54385 | Up: Map | Next: 54421 |