.TITLE PLOTTER .IDENT /V1.05/ .ENABL LC ; ; To do stuff to a Tektronix 4663 plotter. ; ; B. Z. Lederman I.T.T. World Communications ; 23-June-83 ; ; Assumes the attention character is an "Escape" ; and the device address is "A" ; Uses the Fortran calling convention ; argument list pointer on R5 ; and assumes R0 has been saved. ; .PSECT PLOTTE RO, I, LCL, REL, CON ; Same as Fortran-77 ; ; ; CALL PLTRON ; Turn the plotter on ; PLTRON:: MOV #'E, HOLD ; save the turn on character BR SND ; ; CALL PLTROF ; Turn the plotter off ; PLTROF:: CALL ALPHA ; put printer in proper mode MOV #'F, HOLD ; save the turn off character BR SND ; ; CALL PLTSET(byte) ; Send an ESCAPE (attention character) ; followed by one byte ; PLTSET:: ; CALL ALPHA ; might be needed CLR R0 ; precaution MOVB @2(R5), R0 ; get the character SWAB R0 ; character comes second BIS #33, R0 ; Escape comes first BR DMP ; Send characters ; ; CALL PLTREA ; Reset ALPHA Characteristics ; PLTREA:: MOV #'V, HOLD ; Save the reset character BR SND ; ; CALL PLTREG ; Reset GRAPHICS Characteristics ; PLTREG:: MOV #6033, R0 ; Send ESCAPE, FORMFEED BR DMP ; ; CALL PLTRES ; Reset ALPHA and GRAPHICS ; PLTRES:: CALL PLTREG ; reset graphics CALL PLTREA ; reset alpha RETURN ; ; CALL PLTLOD ; Move plotter to Load Point ; PLTLOD:: MOV #"AI, HOLD ; Save command characters BR SND ; ; CALL PLTPEN(number) ; Select the PEN ; PLTPEN:: MOV #"BP, HOLD ; Save command characters CALL SND ; Send them and come back MOV @2(R5), R0 ; Get the pen number BIC #177774, R0 ; Limit to 0, 1, 2, (3) BIS #60, R0 ; Change to ASCII character BR DMP ; and send it ; ; Common routines to send characters. ; SND: MOV #40433, R0 ; send an Escape-A CALL DUMP ; part of PLOTPRIMS MOV HOLD, R0 ; follow with command previously saved DMP: CALL DUMP RETURN ; ; Space for variables ; .PSECT $VARS RW, D, LCL, REL, CON ; Same as Fortran-77 ; HOLD: .WORD ; .END