Chase H.Q.
Routines
Prev:
9F47
Up:
Map
Next:
9FB4
9F99: Draw a NUL-terminated string with a specified style
Adapter entry point: it reorders the registers into the layout the string loop expects and supplies the constant attribute stride of 32 bytes, one attribute row.
Used by the routine at
print_message
.
Input
A
Attribute byte written at each character cell
BC
Attribute address
DE
Back buffer address of the first character cell
HL
String data, NUL terminated
A'
Draw style, as taken by
draw_char
Output
HL
Address of the byte after the NUL terminator
draw_string_with_style
9F99
PUSH BC
Push attribute address
9F9A
EXX
Bank
9F9B
POP HL
HL' = BC
9F9C
LD DE,$0020
DE' = 32
9F9F
LD C,A
C' = A
9FA0
EXX
Bank
9FA1
JR
draw_string_core
goto draw_string_core
The string is terminated by setting the topmost bit of the final character.
draw_string_screen
9FA3
LD A,$01
A' = 1 Set drawing type (single height, plots to real screen)
9FA5
EX AF,AF'
draw_string_core
9FA6
LD A,(HL)
Load a byte and isolate the text part
9FA7
AND $7F
9FA9
PUSH HL
9FAA
CALL
draw_char
9FAD
POP HL
9FAE
BIT 7,(HL)
Was bit 7 set?, quit if so, otherwise loop
9FB0
INC HL
9FB1
RET NZ
9FB2
JR
draw_string_core
Prev:
9F47
Up:
Map
Next:
9FB4