Sherlock: annotated disassembly

Routines

Prev: B34F Up: Map Next: B387
B36B: Start the indirect-object search afresh
As B34F, for $B171, B549, $B180 and $A010.
Output
$B180 The first thing to search, or 0 for a room
B171 0, B549 $FF
B36B XOR A Clear A to zero (and the carry flag) - No indirect-object candidates counted yet ($B171 = 0)
B36C LD ($B171),A Store A in $B171 in "Parser variables"
B36F LD A,$FF Load A with $FF - Number flag B549 = $FF
B371 LD ($B549),A Store A in "B568: $FF until the number in the..." (B549)
B374 CALL $D04F IX = the first thing (D04F)
B377 LD A,($A010) Read $A010 in "Game variables" into A - Requirement code below 7 ($A010): start at 0
B37A CP $07 Compare A with $07
B37C JR NC,$B382 If A is $07 or more, skip ahead to B382
B37E LD IX,$0000 Load IX with $0000
B382 LD ($B180),IX Store IX in $B180 in "Parser variables" - Save the search position in $B180
B386 RET Return to the caller
Prev: B34F Up: Map Next: B387