Sherlock: annotated disassembly

Routines

Prev: BA67 Up: Map Next: BB5C
BB46: Remember a choice (A) and the 3 bytes at $BA19
Addresses named in the title: $BA19.
Input
A The kind of match
Output
$BA60 The kind
$BA61 1
BA62 The three bytes from BA19
BB46 PUSH AF Save AF on the stack - Entry used at BA7C: set $BA61 = 1 and store the kind in BA60
BB47 LD A,$01 Load A with $01
BB49 LD ($BA61),A Store A in $BA61 in "More variables for BA67-BB5C"
BB4C POP AF Restore AF from the stack
BB4D LD ($BA60),A The choice
BB50 LD HL,$BA19 Point HL at $BA19 in "Variables used by the code at BA20-BF58" - Copy 3 bytes to $BA62
BB53 LD DE,$BA62 Point DE at $BA62 in "More variables for BA67-BB5C"
BB56 LD BC,$0003 Load BC with $0003
BB59 LDIR Copy BC bytes from where HL points to where DE points, counting up
BB5B RET Return to the caller
Prev: BA67 Up: Map Next: BB5C