Dick Smith VZ200 Technical Reference Manual page 21

Personal colour computer
Table of Contents

Advertisement

J. CLEAR SCREEN
A routine located at 01C9 hex may be used to clear the video
screen, home the cursor and select display mode (0). It
disturbs all registers. Again it is used simply by calling it:
CALL 01C9
;clear screen, home cursor etc
K. PRINTER DRIVER
The printer driver routine is located at 058D hex. To send a
character to the printer, load the character's ASCII code into
the C register and call the driver. After printing the
character code will be returned in both the A and C registers.
All other registers are disturbed. For example to print the
letter 'a' (ASCII code 97 decimal), you would use:
LD
C,97
;set up code in C reg
CALL 058DH
;& call printer driver
A line feed character (0AH) is automatically inserted after a
carriage return (ODH). If the driver is called with a null byte
in the C register, it will simply check printer status and
return with bit 0 of the A register either set or cleared. The
routine does check for a BREAK key depression, and if one is
detected, it will return with the carry flag set.
L. CHECK PRINTER STATUS
A routine to check printer status is located at 05C4 hex. When
called it loads the printer status (I/O port 00H) into the A
register and returns. Bit 0 will be set (1) if the printer is
busy, or cleared (0) if it is ready. No other registers are
disturbed. An example:
TEST CALL 05C4H
;check is printer is ready
BIT
0,A
;test bit 0
JR
NZ,TEST
;loop if busy
;must be ready
M. SEND CR-LF TO PRINTER
A routine located at 3AE2 hex may be used to send a carriage
return and line feed combination to the printer. No registers
need be set up before calling, but all registers are disturbed.
If the BREAK key is pressed while printing occurs (or while the
printer driver is waiting for the printer to signal 'ready'),
the routine will return with the carry flag set:
CALL 3AE2
;go send CR-LF to printer
JP
C,BRK
;check if BREAK key pressed
;apparently not
- 20

Advertisement

Table of Contents
loading

Related Products for Dick Smith VZ200

Table of Contents