; ;STDLST ;********************************************************** ; ; STDLST - WITH PARALLEL DRIVER ; 10/29/82 ;********************************************************** ; LISTST: LDA PFLG ; get printer flag ORA A ; printer 0 ? JNZ PRINTER5ST ; if not, must be parallel status request IN LSTAT ; ANI 85H ; get CTS, DSR and xmit buffer status CPI 85H ; all must be on MVI A,1 ; RZ ; XRA A ; RET ; ; ; WRITE A CHARACTER ON LISTING DEVICE. ; LIST: LDA PFLG ; get printer flag (at end of jump table) ORA A ; printer 0 ? JNZ PRINTER5 ; parallel CALL LISTST ; ORA A ; JZ LIST ; MOV A,C ; OUT LDATA ; RET ; ; ;*********************************************************** ; ; PARALLEL TYPE PRINTER DRIVER ; ;*********************************************************** ; LSTSTS5 EQU 06H ; status port cpu 8255 LSTDAT5 EQU 04H ; data port ; PRINTER5: LDA PTSTFLG ; pstflg is a flag to indicate if the INR A ; printers have been init. yet or not. CNZ PRNINIT ; only init. printers once!!! ; PRNTLP5: IN LSTSTS5 ; get status ANI 0B0H ; mask for BUF FULL, BUSY and ON LINE CPI 90H ; BUF FULL and ON LINE must be set, BUSY off JNZ PRNTLP5 ; if not ok, loop MOV A,C ; data in C OUT LSTDAT5 ; to data port XRA A ; get ready to strobe OUT 05H ; strobe NOP!NOP!NOP!NOP ; lengthen pulse, (s/b about 5 micros) CMA ; A = 0ffh OUT 05H ; reset strobe line RET ; back to caller for more ; PRINTER5ST: IN LSTSTS5 ; 8255 port c ANI 0B0H ; as above CPI 90H ; MVI A,1 ; 1 = ready for data RZ ; XRA A ; 0 = busy or off line RET ; ; PRNINIT: MVI A,0ACH ; init 8255 OUT 7 ; cmd port MVI A,0FFH ; set b port high OUT 5 ; port b STA PTSTFLG ; set init flag RET ; ; PTSTFLG DB 0 ; set to 0ffh when initialization complete ; ;*********** end of list routines ************* ;