Sherlock: annotated disassembly

Routines

Prev: C249 Up: Map Next: C271
C267: Step the print position back one 7-pixel character
Used by the routine at C249.
Input
C The pixel shift in the cell
L The cell
Output
C, L Stepped back one 7-pixel character
C267 LD A,C Copy C into A - Step the print position back one character: C (the pixel column in the cell) minus 7...
C268 SUB $07 Subtract $07 from A
C26A LD C,A Copy A into C
C26B RET NC ...no borrow: done
C26C DEC L Subtract one from L - Borrow: back to the previous cell (L = L - 1), C + 8
C26D ADD A,$08 Add $08 to A
C26F LD C,A Copy A into C
C270 RET Return to the caller
Prev: C249 Up: Map Next: C271