Sherlock: annotated disassembly

Routines

Prev: D3D5 Up: Map Next: D405
D3E8: Print the name words at IY
Checks for YOU (A7D0) and, by the record's flag bits just before IY, joins D405's printing with or without its adjectives. Used by the message code that names things (A7C5) and by the statement printer BF1C.
Input
IY A thing's name words
Output
The name printed; A and DE kept
D3E8 PUSH AF Save AF on the stack - Save A and DE
D3E9 PUSH DE Save DE on the stack
D3EA LD D,(IY+$01) Read byte +1 of the record at IY into D - DE = the first name word at IY
D3ED LD E,(IY+$00) Read the first byte of the record at IY into E
D3F0 CALL $A7D0 Print it (A7D0)
D3F3 BIT 6,(IY-$02) Test bit 6 of byte -2 of the record at IY - Flag in IY-2 bit 6 clear: reset A7EA
D3F7 JR NZ,$D3FD If bit 6 of byte -2 of the record at IY is set, skip ahead to D3FD
D3F9 XOR A Clear A to zero (and the carry flag)
D3FA LD ($A7EA),A Store A in "A7D0: set when the word was not YOU" (A7EA)
D3FD BIT 5,(IY-$01) Test bit 5 of byte -1 of the record at IY - Flag in IY-1 bit 5 set: continue at D427, otherwise at D416
D401 JR NZ,$D427 If bit 5 of byte -1 of the record at IY is set, skip ahead to D427
D403 JR $D416 Skip ahead to D416
Prev: D3D5 Up: Map Next: D405