.TITLE TOUT .ENABL LC ; ; CALL TOUT( CHAR ,NCHRS ,EVENT FLAG ) -- This subroutine will output ; a string of characters to the plotting device. Where, ; ; CHAR Character string. ; NCHRS Number of characters; if omitted, assumed to be 1. ; EVENT FLAGE event flag number (1-32), this routine uses QIO$S ; will not wait for I/O to complete. ; ; Note: If the plotting device is a Tektronix 4662 (IDev=3), ; the number of characters output is summed and when that ; number is about to exceed the number of bytes available, ; the plotter is polled which allows the buffer to empty. ; .PSECT TOUT .MCALL QIO$S ; TOUT:: TST ILun ;VALID PLOTTING DEVICE? BEQ D ;BRANCH IF NOT ; MOV #1,NCHRS ;SET DEFAULT NUMBER OF CHARACTERS CMP #2,(R5) ;NCHRS PRESENT? BGT 1$ ;BRANCH IF NOT MOV @4(R5),NCHRS ;SET PROPER NUMBER OF CHARACTERS ; 1$: CMP #3,IDev ;TEKTRONIX 4662? BNE C ;BRANCH IF NOT ; A: CMP IBfDv3,NCHRS ;SUFFICIENT ROOM? BGE B ;BRANCH IF TRUE ; CALL BUFDV3 ;POLL FOR NEW BUFFER LENGTH BR A ;TRY AGAIN ; B: SUB NCHRS,IBfDv3 ;DECREMENT BUFFER LENGTH C: QIO$S #IO.WAL,ILun,@6(R5),,,,<2(R5),NCHRS> ;OUTPUT STRING D: RETURN ;RETURN ; NCHRS: .WORD 0 ;NUMBER OF CHARACTERS