Sherlock: annotated disassembly

Routines

Prev: C2BA Up: Map Next: C316
C306: Page-wait: flash the cursor, wait for a key, clear
Called by the character printer (C2D1) when a newline comes after fifteen lines of text ($A019 = 15) since the player last typed a command or pressed a key. Sets FLASH on the attribute at $5A5F - the right-hand end of the chain strip on row 18 - waits for a key via the GET-KEY wrapper at C415, turns FLASH off again and makes the text lines full width (C142). Nothing is cleared: the text simply carries on scrolling.
Typing LOOK. LOOK in the sitting room stops here with $A019 = 15 part way through the second description, waiting for a key.
Output
A key waited for, the window cleared; HL kept
C306 PUSH HL Save HL (the print position)
C307 LD HL,$5A5F HL -> the attribute byte for the prompt line
C30A SET 7,(HL) Turn on FLASH there, as a "press a key" cue
C30C CALL $C415 Block here until the player presses something
C30F RES 7,(HL) Turn FLASH back off
C311 CALL $C142 Clear the screen and reset the text window
C314 POP HL Restore HL
C315 RET Return to the caller
Prev: C2BA Up: Map Next: C316