Sherlock: annotated disassembly

Routines

Prev: C128 Up: Map Next: C142
C129: Narrow the text lines to the left half (a picture is showing)
Called at A284, after the 18 newlines that clear the text window and before the room's picture is drawn in the top right quarter (F3C2). Sets C128, the characters-left count (C1F5) to 18, the print position to $5020 and the pixel shift to 2, and clears the page line count ($A019). From then on the scroll (C316) moves only the left 16 bytes of each pixel line and leaves the colours alone, so the picture stays where it is while the text runs beside it.
In room 6 the description comes out 18 characters to a line ('You are in an | entrance hallway. | Above there is the | stairway...').
Output
$C1F5 18 characters to a line
$C1F8 The print position
$C128 1
C129 XOR A Clear A to zero (and the carry flag) - New page: no lines printed yet
C12A LD ($A019),A Store A in $A019 in "Game variables"
C12D INC A Add one to A - Narrow mode on
C12E LD ($C128),A Store A in "Flag: text lines are narrow (a picture is showing)" (C128)
C131 LD A,$12 18 characters to a line
This entry point is used by the routine at C142.
C133 LD ($C1F5),A Characters left on this line
C136 LD HL,$5020 Load HL with $5020 - Print at the start of screen row 17
C139 LD ($C1F8),HL Store HL in C1F8 in "Command-window state"
C13C LD A,$02 Load A with $02 - Pixel shift 2
C13E LD ($C1FA),A Store A in $C1FA in "Command-window state"
C141 RET Return to the caller
Prev: C128 Up: Map Next: C142