;+ ;;********************************************************************** .Sbttl Printer interrupt service routine. ;;************** ;; Alvin Printer Handler - Offline status will generate a ;; continuous interrupt until printer comes back online. ;; If the control block contains a non-blank ASOCDEvice, ;; and FLOWCTL is enabled in the logical status, then the ;; reactivation of the input device associated with the printer ;; will occur when the buffer reaches a condition of being ;; only BUFMARgin characters full. ;- PRTINT:: TST R1 ;Is the printer online? BPL PRTENTRY ;Yes, branch. BIS #OFFLINE+ERROR,(R2) ;Set status as offline. RTS PC PRTENTRY: BIC #OFFLINE,(R2) ;Clear any offline status JSR PC,LOUTPUT ;Send the next character BIT #FLOWCTL,LCTL(R2) ;Is there input stream flow control? BEQ PRTEXIT ;No, branch. MOV ASOCDE(R2),R1 ;Get the input device descriptor BEQ PRTEXIT ;The is none, exit BIT #EXTRA,(R1) ;Is it waiting to be started? BEQ PRTEXIT ;No, exit. JSR PC,BUFCOUNT ;Count the characters in the buffer CMP R0,BUFMARGIN(R1) ;Should input be started? BHI PRTEXIT ;No, still too full, branch MOV ASOCDE(R1),R0 BIT #REQUEST!DISABLED,(R0) ;Can Xon be initiated? BNE PRTEXIT ;No, branch to exit (get it next intrpt) BIC #EXTRA,(R1) ;Xon is headed out - don't do it again. BIT #SEIZED!DISABLE,(R0) ;Is it currently active? BNE PRTSETX ;Yes, branch MOV #SEIZED!IGNORE,(R0) ;Seize device & ignore next intrpt MOV DEVADR(R0),R3 ;Get device address MOVB FLOWON(R0),2(R3) ;Send the Flow stop char BR PrtEXIT ; and exit. PRTSETX: MOVB FLOWON(R0),NEXTOUT(R0) ;Put char to next send in desc BIS #EXTRA,(R0) ;Flag to send NEXTOUT char immediately PRTEXIT: RTS PC ;Return from interrupt.