Sherlock: annotated disassembly

Routines

Prev: A65D Up: Map Next: A679
A66C: Code $01: print the next parameter as a word (and: fetch the next parameter)
DE = the next word of the parameters the caller pushed before printing the message, at A59D, which moves on by two. Returns NZ, and a handler that returns NZ has DE printed as a dictionary word reference (A633, A5EA) - so as code $01 it prints the parameter as a word. The other codes call it to read their parameters.
Input
$A59D The parameter pointer
Output
DE The next parameter word
HL The pointer, moved on two
F NZ
A66C LD HL,($A59D) The message printer's parameter pointer (A59D)
A66F LD E,(HL) Read the byte HL points at into E - DE = the next parameter word; the pointer moves on two bytes
A670 INC HL Step HL on to the next byte
A671 LD D,(HL) Read the byte HL points at into D
A672 INC HL Step HL on to the next byte
A673 LD ($A59D),HL Store HL in "Where the message's stack parameters end" (A59D)
A676 OR $01 Make A non-zero, which clears the zero flag, and hand that back to the caller
A678 RET Return to the caller
Prev: A65D Up: Map Next: A679