PAGE ; CompuPro Interfacer board equates. GBP0: EQU 0 ;Serial port zero GBP1: EQU 2 ;Serial port one GBDATA: EQU 0 ;Data on even I/O unit GBSTAT: EQU 1 ;Status on odd I/O unit GBTBMT: EQU 0000_0001B ;Transmit buffer empty GBDAV: EQU 0000_0010B ;Data available GBOPT: EQU 0000_0100B ;Optional status line GBPE: EQU 0000_1000B ;Parity error GBOR: EQU 0001_0000B ;Overrun error GBFE: EQU 0010_0000B ;Framing error GBCC: EQU 0100_0000B ;RS 232 CC input GBCB: EQU 1000_0000B ;RS 232 CB input GBRIE: EQU 0000_0001B ;Receiver interrupt enable GBTIE: EQU 0000_0010B ;Transmitter interrupt enable GBCD: EQU 0000_0100B ;RS 232 CD output GBCA: EQU 0000_1000B ;RS 232 CA output GBTSB: EQU 0001_0000B ;Number of stop bits GBNP: EQU 0010_0000B ;No parity GBEPS: EQU 0100_0000B ;Even parity GBNBI: EQU 1000_0000B ;number of bits/character ; P u n c h O u t p u t. ; ; Send a character to the punch device. If no punch ; device exists then immediately return. ; ; ENTRY C = ASCII character to output. PUNCH: if @ldr <> 4 INB GBP1+GBSTAT AND AL,#GBTBMT JZ PUNCH ;If transmit buffer full MOV AL,CL OUTB GBP1+GBDATA endif RET SPACE 4,10 ; R e a d e r I n p u t. ; ; Read the next character from the currently assigned ; reader device into the A register. ; ; EXIT A = character read from the reader device. READER: if @ldr <> 4 INB GBP1+GBSTAT ;Input from port AND AL,#GBDAV ;Mask data available JZ READER ;If data not available INB GBP1+GBDATA endif RET SPACE 4,10 ; L i s t O u t p u t. ; ; Send a character to the list device. If the list ; device is not ready to receive a character wait ; until the device is ready. ; ; ENTRY C = ASCII character to be output. LIST: if @ldr <> 4 INB GBP1+GBSTAT ;Get status AND AL,#GBCC+GBTBMT SUB AL,#GBTBMT JNZ LIST MOV AL,CL OUTB GBP1+GBDATA RET ENDIF SPACE 4,10 ; L i s t S t a t u s. ; ; Return the ready status for the list device. ; ; EXIT A = 0 (zero), list device is not ready to ; accept another character. ; A = FFh (255), list device is ready to accept ; a character. LISTST: if @ldr <> 4 INB GBP1+GBSTAT AND AL,#GBCC+GBTBMT SUB AL,#GBTBMT LD AL,#0FFH JZ LSTST1 ;If not ready XOR AL,AL LSTST1: endif RET