Sherlock: annotated disassembly

Routines

Prev: C542 Up: Map Next: C571
C55A: Guess the indirect object: try each one until the record's checks pass
If C542 says so, puts 0, 1, 2... in $A035 in turn (up to the limit from C45E) and runs the record's checks (C929) until one passes - so a command can work without naming the second thing.
Output
F NZ when a candidate indirect object let the record's checks pass; Z when none did
$A035 The candidate that passed
C55A CALL $C542
C55D JP Z,$C929 No: just run the checks (C929)
This entry point is used by the routine at C4D1.
C560 LD B,$FF Load B with $FF - Candidate B = 0, 1, 2...
C562 INC B Add one to B
C563 CALL $C45E Out of range (C45E)?
C566 JR Z,$C570 Yes: give up (Z)
C568 LD ($A035),A Try it as the indirect object
C56B CALL $C929 Does the record's check pass (C929)?
C56E JR Z,$C562 If the zero flag is set, go back to C562 - No: next candidate; yes: return NZ
C570 RET Return to the caller
Prev: C542 Up: Map Next: C571