Prev: FC83 Up: Map Next: FCC4
FC86: Print String
Prints the BASIC string "s$" at the current print position in a 64-column font. It finds the string with the ROM routine LOOK-VARS, using the name at PrintString_VariableName, and stops with an error if it is missing. Codes below 20 go straight to RST 10; codes from 90 upwards are skipped. Called by BASIC as "prn" (FC86).
PrintString FC86 DI Disable interrupts.
FC87 LD ($FF76),SP
FC8B LD SP,$FFBE
FC8E XOR A
FC8F LD ($FD02),A
FC92 LD A,$02
FC94 CALL $1601
FC97 LD HL,$FC83
FC9A CALL MatchString_LookUpVariable
FC9D JR Z,PrintString_3
PrintString_0 FC9F LD A,(HL)
FCA0 INC HL
FCA1 CP $90
FCA3 JR NC,PrintString_2
FCA5 CP $20
FCA7 JR NC,PrintString_1
FCA9 RST $10
FCAA JR PrintString_2
PrintString_1 FCAC CALL PrintString_Character
PrintString_2 FCAF DEC BC
FCB0 LD A,B
FCB1 OR C
FCB2 JR NZ,PrintString_0
PrintString_3 FCB4 LD A,($FD02)
FCB7 OR A
FCB8 JR Z,PrintString_4
FCBA LD A,$20
FCBC CALL PrintString_Character
PrintString_4 FCBF LD SP,($FF76)
FCC3 RET
Prev: FC83 Up: Map Next: FCC4