.TITLE TOUTPT .ENABL LC ; ; CALL TOUTPT( CHAR [,NCHRS] ) -- This subroutine will output ; a [string of] character[s] to the plotting device. Where, ; ; CHAR Character [string]. ; NCHRS Number of characters; if omitted, assumed to be 1. ; ; 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 TOUTPT .MCALL QIOW$S ; TOUTPT::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 ; JSR PC,BUFDV3 ;POLL FOR NEW BUFFER LENGTH BR A ;TRY AGAIN ; B: SUB NCHRS,IBfDv3 ;DECREMENT BUFFER LENGTH C: QIOW$S #IO.WAL,ILun,#1,,,,<2(R5),NCHRS> ;OUTPUT STRING D: RTS PC ;RETURN ; NCHRS: .WORD 0 ;NUMBER OF CHARACTERS