CUSTOM DRIVERS
If you are writing your own drivers the following locations are used
to access the card CY = NO where N = slot#)
Printer Status — $CØSl,Y (READ)
Output Latch - $CØ8l,Y (WRITE)
Strobe Low — $CØ82,Y (WRITE)
Strobe High — $CØ84,Y (WRITE)
The following routine gives an example of how to output a character
using these locations:
PHA
; SAVE OUTPUT CHARACTER ON STACK
LDY lØ
; SET UP Y-REGISTER FOR SLOT #1
PAPER? LDA $CØ8l,Y
; CHECK STATUS FOR PAPER
AND Ø4
; CHECK SIT 2
BNE PAPER?
; IF SET THEN NO PAPER, RECHECK
SLCT?
LDA $CØ8l,Y
; CHECK STATUS FOR PRINTER SELECT
AND Ø2
; CHECK BIT 1
BEQ SLCT?
; IF ZERO THEN NOT SELECTED
BUSY?
LDA $CØSl,Y
; CHECK STATUS FOR PRINTER BUSY
AND Ø8
; CHECK BIT 3
BNE BUSY?
; IF SET THEN PRINTER IS BUSY
OUTPUT? PLA
; REGET OUTPUT CHARACTER
STA $CØ81,Y
; STORE TO OUTPUT LATCH
STA $CØ82,Y
; PULL STROBE LINE LOW
STA SCØ84,Y
; RESET STROBE LINE HIGH
RTS
; RETURN FROM SUBROUTINE
—10—