Sherlock: annotated disassembly

Routines

Prev: E370 Up: Map Next: E39C
E38F: Store HL as the money a thing holds (+9/+10)
Packs HL seven bits to a byte (the 'pounds, shillings and pence' fact has the format) into IX+9 and IX+10. With E39C and E3A9 it is how PAY TO (E370) and a cab fare (9B25) move money.
Input
HL total in pence
IX the thing
E38F RL L Rotate L left through the carry - Shift HL's bit 7 up into H...
E391 RL H Rotate H left through the carry
E393 SRL L Shift L right (halve it) - ...and clear it in L: L = pence & $7F, H = pence >> 7
E395 LD (IX+$09),L Store L in the adjective low byte (+9) of the thing record at IX
E398 LD (IX+$0A),H Store H in the adjective high byte (+10) of the thing record at IX
E39B RET Return to the caller
Prev: E370 Up: Map Next: E39C