[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about parallel card.
In article <1998031821103001.QAA04706@ladder03.news.aol.com>,
BabarStCyr <babarstcyr@aol.com> wrote:
>Hi
>
>Are old parallel cards able to send AND receive datas?
>In others words can I do a LDA $CXXX to GET a byte?
>Are they any "standard" programming address for this type of cards?
I recently saw the manual for the Apple Parallel Interface Card (the newer
version, that has both Apple and Centronics modes), and it seems to indicate
that the card can receive data. I don't actually have a card to test it
with, alas.
But in general, the answer is "No"...most Apple II parallel cards are
send-only.
The "standard" I/O locations, such as they are ("n" = slot number):
Signature bytes: $Cn05 = $48
$Cn07 = $48
Output port: $C080,X (X = slot*16)
Status bit: $CnC1 (high bit = 0 if printer ready to receive data)
For example,
; Printer init routine
LDA PSLOT ;Get printer slot
ORA #$C0
STA OUT+2 ;Patch output routine
ASL
ASL
ASL
ASL
TAX ;Slot*16 into X
RTS
;
; Printer output routine (char in A, slot*16 in X)
OUT BIT $C0C1 ;(Patched by init routine)
BMI OUT ;Loop if not ready
STA $C080,X ;Send it
RTS
- Neil Parker
--
Neil Parker, nparker@inferno.uoregon.edu, nparker@axis.llx.com,
http://axis.llx.com/~nparker/ (Note new addresses and home page!)
Unsolicited commerical e-mail is not welcome, and will be discarded unread.