Sherlock: annotated disassembly

Routines

Prev: B6FD Up: Map Next: B77E
B772: A = the class of dictionary word DE
The high nibble of the word's first byte in the dictionary at $5DBF: $50 for nouns, $60 for adjectives (the parse at B6FD looks for these).
Input
DE A dictionary word reference
Output
A The class: $50 noun, $60 adjective
B772 LD HL,$5DBF Point HL at $5DBF - The dictionary's class table at $5DBF: one byte per word, indexed by DE & $0FFF
B775 LD A,D Copy D into A
B776 AND $0F Keep only bits 0, 1, 2, 3 of A (mask $0F)
B778 LD D,A Copy A into D
B779 ADD HL,DE Add DE to HL
B77A LD A,(HL) Read the byte HL points at into A - The class is its high nibble
B77B AND $F0 Keep only bits 4, 5, 6, 7 of A (mask $F0)
B77D RET Return to the caller
Prev: B6FD Up: Map Next: B77E