1 /PRINTER & PLOTTER HANDLER ADCOM X80SP
2 / PLOTTER HANDLER CONVERTS [ INTO DC3 AND ] INTO DC1
3 / X80SP HANDLES HT,VT,CR,LF,FF
4 / HANDLER SUPPORTS DC3 (XOFF) - DC1 (XON) COMMANDS FROM X80SP.
5 / SYSTEM TTY INPUT ETX (^C) CAUSES RETURN FROM THE HANDLER.
6 / ALL CONTROL CHARACTERS SEND TO THE HANDLER ARE DIRECTED TO THE X80SP.
7 / JOHANN J. ANDRES UNIVERSITY GOETTINGEN
9 / H.A. 10.DEC.1981 REV 0.0
10 / H.A. 4. APR.1982 REV 1.0 INSERTS [ --> DC3 AND ] --> DC1
11 / H.A. 5. OCT.1982 REV 1.1 LITTLE CHANGES SAVE 2 WORDS OF MEMORY
12 / H.A. 10.OCT.82 REV 1.2 REMOVES POSSIBLE LISF/LIRB TIMING PROBLEMS
13 / H.A. 26.OCT.82 REV 1.3 REMOVES FRTS PROBLEM: SOME CHARS WERE LOST
16 INDVC=31 / LPT RS-232C INTERFACE
19 LSF=10^OUTDVC+6001 / SKIP ON LPT FLAG
20 LLS=10^OUTDVC+6006 / CLEAR FLAG & PRINT CHARACTER
21 LISF=10^INDVC+6001 / SKIP ON LPT FLAG
22 LIRB=10^INDVC+6006 / CLEAR FLAG & READ STATUS
23 KSF=10^TTYDVC+6001 / SKIP ON TTY FLAG
24 KRS=10^TTYDVC+6004 / OR TTY KBD CHARACTER INTO AC
25 / ACL=7701 / PAL8 DOESN'T KNOW HIS COMPUTER!
29 *0 / 8 WORD HANDLER BLOCK
34 LPT&177 / STARTING ADR.
38 1040 / WRITE ONLY LINE PRINTER
39 PLT&177 / STARTING ADR.
40 0;0 / 2 WORDS MUST BE ZERO
43 *200 / START OF HANDLER
44 PLT, 0 / ENTRY FOR PLOTTER HANDLER
46 TAD PLT / HERE WE SAVE THE RETURN ADR.
47 DCA LPT / INTO THE LPT RETURN POINT
48 TAD TPLT / INSERT PLOTTER CALL CMD
53 TAD TLPT / INSERT LPT CALL CMD
55 TAD LP23 / SWITCH OFF THE
56 JMS LPTPCH / PLOTTER MODE
60 TAD I LPT /LINK GOES ON HERE. IF NOT READ WAS REQUESTED
64 LPT214, RDF / FF CONSTANT
66 DCA LPTXIT /SAVE CALLING FIELD IN RETURN SEQUENCE
70 DCA LPTCDF /GET BUFFER FIELD
73 DCA LPTCA /LPTCA GETS BUFFER ADDRESS
78 SNL /IF LINK NOT SET,GIVE ERROR
80 SZA CLA / INSERT FF IN FRONT OF THE FIRST DATA BLOCK TO PRINT
82 TAD LPT214 / FF --> AC
85 \f/NOW PICK UP THE CHARACTERS, UNPACK THEM AND PRINT.
87 / LOOP TO PICK UP THE CHARACTERS
107 NOP / BUFFER MAY BE AT FIELD BOUNDARY
118 LPTERR, CLA CLL CML RAR / FATAL ERROR RETURN
119 JMP LPTXIT / HOME TO MAM
122 / HERE WE PRINT THE CHARACTERS
126 AND LPT177 / WE TRUNCATE TO SEVEN BITS CHARACTER
127 TYPE, 0 / CHANGED AT EXECUTION TIME SEE TPLT & TLPT
128 TAD SAC / RELOAD CHARACTER TO PRINT
129 TAD LPM135 / TEST FOR ]
132 TAD LP23 / WE PRINT A DC1
133 JMP L4 / CONVERSION ] INTO DC3 DONE
139 L3, TAD SAC / RESTORE AC
141 LLS / CLEAR FLAG LOAD CHARACTER & PRINT
142 LSF / IF PRINTER DONE FLAG SET, THEN WE CONTINUE
143 JMP .-1 / ELSE WE WAIT FOR DONE FLAG
145 TAD LP7600 / THIS IS TO GET A NEGATIVE NUMBER
147 KRS / OR TTY KBD INTO AC
148 TAD LPT175 / TEST FOR ETX (^C)
149 SNA CLA / IF NO ETX THEN GO AND WAIT FOR LP FLAG
150 KSF / ETX ENTERED, TTY KBD ACTIVE THEN JMP INTO MONITOR
151 JMP LPISF / TEST INPUT FROM PRINTER
155 TAD LPOLD / LOAD THE LAST STATUS WORD
156 LISF / IS THERE ANY NEW STATUS?
158 LIRB / IF THERE IS A NEW STATUS THEN WE READ ELSE WE TAKE THE OLD ONE
159 DCA LPOLD / SAVE THE ACTUAL STATUS WORD
160 TAD LPOLD / RESTORE STATUS --> AC
161 AND LPT177 / MASK OUT 7 BITS
162 TAD LPM23 / TEST DC3 (^S)
164 JMP LP7600 / DC3 ENTERED WAIT FOR DC1
165 JMP I LPTPCH / DC1 OR MEANINGLESS INPUT, SO WE CONTINUE PRINTING
168 TLPT, JMP L4 / LINE PRINTER HANDLER
169 TPLT, DCA SAC / SAVE AC
171 SAC, 0 / ON ENTRY WE SAVE THE AC