Sherlock: annotated disassembly

Routines

Prev: A2B1 Up: Map Next: A2E4
A2BD: Gather a verb record's flag nibbles into $A01D and $A01E
Addresses named in the title: $A01D, $A01E.
IX is a verb record (8259): $A01D = the high nibbles of its first two word slots (+1, +3), $A01E those of the last two (+5, +7) - the verb's grammar flags, described at 8259 (direct object, indirect object, preposition before the object...).
Input
IX A verb record
Output
$A01D The high nibbles of +1 and +3
$A01E The high nibbles of +5 and +7
A2BD LD A,(IX+$05) Read byte +5 of the record at IX into A - IX = a verb record. +5's high nibble, brought down...
A2C0 RRCA Rotate A right one place (bit 0 goes to carry and bit 7)
A2C1 RRCA Rotate A right one place (bit 0 goes to carry and bit 7)
A2C2 RRCA Rotate A right one place (bit 0 goes to carry and bit 7)
A2C3 RRCA Rotate A right one place (bit 0 goes to carry and bit 7)
A2C4 AND $0F Keep only bits 0, 1, 2, 3 of A (mask $0F)
A2C6 LD C,A Copy A into C
A2C7 LD A,(IX+$07) Read byte +7 of the record at IX into A - ...plus +7's high nibble (above it) = $A01E
A2CA AND $F0 Keep only bits 4, 5, 6, 7 of A (mask $F0)
A2CC ADD A,C Add C to A
A2CD LD ($A01E),A Store A in $A01E in "Game variables"
A2D0 LD A,(IX+$01) Read byte +1 of the record at IX into A - +1's high nibble, brought down...
A2D3 RRCA Rotate A right one place (bit 0 goes to carry and bit 7)
A2D4 RRCA Rotate A right one place (bit 0 goes to carry and bit 7)
A2D5 RRCA Rotate A right one place (bit 0 goes to carry and bit 7)
A2D6 RRCA Rotate A right one place (bit 0 goes to carry and bit 7)
A2D7 AND $0F Keep only bits 0, 1, 2, 3 of A (mask $0F)
A2D9 LD C,A Copy A into C
A2DA LD A,(IX+$03) Read byte +3 of the record at IX into A - ...plus +3's high nibble (above it) = $A01D
A2DD AND $F0 Keep only bits 4, 5, 6, 7 of A (mask $F0)
A2DF ADD A,C Add C to A
A2E0 LD ($A01D),A Store A in $A01D in "Game variables"
A2E3 RET Return to the caller
Prev: A2B1 Up: Map Next: A2E4