Trailing-Edge
-
PDP-10 Archives
-
BB-H348C-RM_1982
-
swskit-v21/listings/mcb/ttdrv.list
There are no other files named ttdrv.list in the archive.
TTDRV MACRO M1110 13-OCT-79 13:18
TABLE OF CONTENTS
4- 581 TERMINAL INITIATOR
5- 1628 OUTPUT-NEXT-BYTE ROUTINE
6- 2317 END-OF-INPUT-LINE PROCESSOR
7- 2509 CHARACTER INPUT INTERRUPT PROCESSOR
8- 3323 MISCELLANY
9- 3551 CONTROLLER-DEPENDENT DATA BASE
10- 3769 CONTROLLER-DEPENDENT OUTPUT INTERRUPT CODE
11- 3908 TERMINAL TIMEOUT ROUTINE
12- 4014 CONTROLLER-DEPENDENT OUTPUT CHAR ROUTINE
13- 4122 CONTROLLER-DEPENDENT INPUT INTERRUPT CODE
14- 4376 CONTROLLER-DEPENDENT POWERFAIL CODE
15- 4601 MISCELLANEOUS CONTROLLER-DEPENDENT SUBROUTINES
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 3
1 .TITLE TTDRV
2 .IDENT /19/
3
4 ;
5 ; COPYRIGHT (C) 1973, 1978
6 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 01754
7 ;
8 ; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
9 ; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
10 ;
11 ; VERSION 19
12 ;
13 ; D. N. CUTLER 24-OCT-73
14 ;
15 ; PRE-VERSION 18 MODIFICATIONS BY:
16 ;
17 ; D. N. CUTLER
18 ; T. J. MILLER
19 ; R. LARY
20 ; E. L. BAATZ
21 ;
22 ; MODIFIED BY:
23 ;
24 ; EB011 -- CLEAR I/O RUNDOWN IN PROGRESS
25 ;
26 ; EB012 -- MAKE MODEM TIMEOUT ROUTINES CHECK FOR OFFLINE UNITS
27 ;
28 ; EB013 -- CHECK I/O QUEUE AFTER UNSOLICTIED CHARACTER AST
29 ;
30 ; EB014 -- CORRECT LABEL FOR LA30P CODE
31 ;
32 ; EB016 -- READ CORRECT NUMBER OF CHARACTERS FOR IO.RPR
33 ; WHERE PROMPT IS LONGER THAN READ
34 ;
35 ; EB018 -- DON'T LET IO.WBT'S ECHO MATERIAL READ IN
36 ; NO ECHO MODE
37 ;
38 ; EB019 -- CLOSE IO.WBT WINDOWS
39 ;
40 ; EB024 -- ALLOW ECHOING TO BREAKTHROUGH CONTROL/S
41 ;
42 ; EB030 -- CLEAR I.PRM+16 IF WE WRITE INTO IT. $FINBF MUST
43 ; CLEAR IT FOR CHECKPOINTING DURING TERMINAL INPUT.
44 ;
45 ; EB036 -- CHECK CARRIAGE CONTROL IF NDF T$$TRW AND DF T$$RPR
46 ;
47 ; EB037 -- DO NOT FALL INTO PARTIAL CONTROL/R CODE IF NDF T$$CTR
48 ; AND DF T$$BTW
49 ;
50 ; EB041 -- 1) MODIFY I.PRM CORRECTLY IF VSECTS
51 ; 2) DO NOT LOOP IF BUFFER NOT MAPPED BY A WINDOW
52 ; 3) CORRECT CODE FOR DF T$$BTW AND NDF T$$RPR
53 ;
54 ; EB054 -- MAKE BREAKTHROUGH WRITES ECHO PROPERLY IF DF T$$UTB
55 ;
56 ; EB057 -- 1) CLEAR UCB STATUS ON HANGUP
57 ; 2) PREVENT TTCHK FROM SETTING UCB BITS FOR DISABLED
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 3-1
58 ; LINES
59 ; 3) CORRECT CONDITIONAL CODE IN TTHUP TO ALLOW HANGUP
60 ; IN SYSTEM WITH DM11-BB'S AND REMOTE DZ LINES
61 ;
62 ; EB055 -- 1) DO PROPER CONDITIONAL ASSEMBLY FOR IO.RPR AND
63 ; MAINTAIN PROPER STACK LEVEL
64 ; 2) DZ11 SHOULD NOT CLEAR S.CTM ON OUTPUT INTERRUPT
65 ; NOT EXPECTED
66 ; 3) GENERAL TIGHTENING OF CONDITIONAL CODE
67 ; 4) HAVE DM11-BB CHECK FOR PRESENCE OF CORRESPONDING
68 ; DH11 UCB
69 ;
70 ; EB061 -- 1) DO NOT CLEAR XOFF BITS FOR A CANCEL
71 ; 2) DO NOT ECHO CR AND ESC THAT TERMINATE IO.RNE
72 ;
73 ; EB069 -- SET BUFFER SIZE TO 72. WHEN ANSWERING REMOTE LINES
74 ;
75 ; EB090 -- 1) CHECK SIZE OF IO.RPR PROMPTS
76 ; 2) SEND XOFF WHEN DESIRED FOR IO.RPR
77 ; 3) ALLOW ONLY CTRL/Q, /S AND /O DURING IO.RPR PROMPT
78 ; 4) DO NOT HANG TERMINAL IF CTRL/O DURING IO.RPR PROMPT
79 ;
80 ; EB091 -- CLOSE WINDOW INVOLVING HELD UNSOLICITED CHARACTER
81 ; AND NONEMPTY I/O QUEUE
82 ;
83 ; EB092 -- DO NOT ARM UNSOLICITED CHARACTER AST CODE IF BAD
84 ; AST ENTRY POINT ADDRESS
85 ;
86 ; EB095 -- REMOVE DEFINITION OF T$$18S
87 ;
88 ; BS035 -- CORRECT COND. ASSY ERROR IF T$$MIN & T$$18S ONLY
89 ; ; SR001
90 ; SR001 -- CONDITIONALIZE CONTROL/O PROCESSING ; SR001
91 ; SCOTT G. ROBINSON 26-JUL-78 ; SR001
92 ;
93 ; TERMINAL DRIVER FOR DL11-A LINE INTERFACE AND DH11/DJ11/DZ11
94 ; LINE MULTIPLEXERS
95 ;
96 ; W A R N I N G
97 ;
98 ; NOT ONLY HAS THE STRUCTURE OF TTDRV CHANGED RADICALLY BUT
99 ; BITS IN U.CW2 HAVE CHANGED POSITION WITHIN THE WORD OR
100 ; HAVE BEEN MOVED TO A DIFFERENT WORD.
101 ;
102 ; IO.RAL NOW ECHOS INPUT CHARACTERS. TO SUPPRESS ECHOS, USE
103 ; IO.RAL!TF.RNE OR IO.RAL!IO.RNE.
104 ;
105 ; THE PURPOSE OF THE FOLLOWING MACROS IS TO REDUCE THE AMOUNT
106 ; OF TYPING REQUIRED TO MAKE THIS A LOADABLE DRIVER. THERE ARE
107 ; TWO FLAVORS OF LOADABLE TERMINAL DRIVERS
108 ; 1) THAT OBTAINED BY SPECIFYING, DURING THE PERIPHERAL OPTIONS,
109 ; THAT THE TERMINAL DRIVER IS TO BE LOADABLE. THIS RESULTS
110 ; IN LD$TT BEING DEFINED AND A TTDRV.MAC BEING ASSEMBLED THAT IS
111 ; LOADABLE AND HANDLES ALL TERMINAL DEVICES DESCRIBED IN SYSGEN.
112 ; IT IS ONLY USEFUL FOR LOADING BY VMR.
113 ;
114 ; W A R N I N G -- THE IMMEDIATELY FOLLOWING INFORMATION IS OF INTEREST
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 3-2
115 ; ONLY TO SOPHISTICATED PEOPLE WHO DO THEIR OWN MODIFICATIONS
116 ; TO THIS DRIVER. THE FOLLOWING PROCEDURE FOR MAKING THIS DRIVER
117 ; A LOADABLE USER DRIVER IS NOT (REPEAT -- NOT!!) SUPPORTED BY DEC
118 ;
119 ; 2) THAT OBTAINED FROM DRIVING SELECTED TERMINALS WITH A
120 ; SEPERATE "USER DRIVER" THAT IS IN REALITY A COPY OF TTDRV.MAC
121 ; ASSEMBLED WITH A MODIFIED VERSION OF RSXMC.MAC. NOTE THAT SOME
122 ; "TERMINAL DRIVER FEATURES" REQUIRE EXECUTIVE SUPPORT THAT IS
123 ; CONDITIONALLY ASSEMBLED (T$$BUF AND T$$VBF). IF THOSE SYMBOLS WERE
124 ; NOT DEFINED IN THE SYSTEM'S RSXMC.MAC, DEFINING THEM IN THE MODIFIED
125 ; RSXMC.MAC IS USELESS.
126 ; TO PRODUCE AN EXPERIMENTAL TERMINAL DRIVER FOR A XY-11 (WHERE XY IS
127 ; DH (WITHOUT DM11-BB), DJ, DZ OR DL, AND LOADABLE DRIVER SUPPORT WAS
128 ; CHOSEN), CREATE A XYUSRTB.MAC CONTAINING THE PROPER DCB, UCB'S AND
129 ; SCB'S FOR A DEVICE XY:.
130 ; WHEN SYSGEN2 ASKS ABOUT USER DRIVERS, ANSWER YES AND PROCEED SIMILARLY
131 ; TO MAC>USRTB=[1,1]EXEMC/ML,[200,200]RSXMC,XYUSRTB
132 ; LBR>RSX11M/RP=[200,200]USRTB
133 ; USE EDI TO INCLUDE USRTB IN RSXBLD.CMD AND TO DELETE "GBLDEF=
134 ; $USRTB:0". WHEN THE SYSTEM IS AUTOMATICALLY BUILT, THE SYMBOLS
135 ; $XYTBL, $XYINP, AND $XYOUT SHOULD BE UNDEFINED.
136 ; AFTER THE SYSTEM HAS BEEN BUILT, MODIFY RSXMC.MAC TO INCLUDE
137 ; THE SYMBOLS LD$TT AND LD$$Y. REMOVE ALL UNNECESSARY TERMINAL DEVICE
138 ; SYMBOLS (EG., D$$J11) AND ADD X$$Y11=1. ASSEMBLE IT SIMILARLY TO
139 ; MAC>[200,200]XYDRV,XYDRV=[1,1]EXEMC/ML,[200,200]RSXMC,DK1:[11,10]TTDRV
140 ; AND BUILD SIMILARLY TO
141 ; TKB>[1,54]XYDRV/-MM/-HD,[1,34]XYDRV,[1,54]XYDRV=[200,200]XYDRV
142 ; [1,54]RSX11M.STB/SS,[1,1]EXELIB/LB
143 ; /
144 ; PAR=DRVPAR:120000:XXXXX
145 ; STACK=0
146 ; //
147 ; WHERE DRVPAR IS A TASK OR SYS PARTITION BIG ENOUGH TO HOLD THE
148 ; DRIVER, THE 120000 IS BECAUSE THE DRIVER IS MAPPED TO THE
149 ; REST OF THE EXECUTIVE BY APR5, AND XXXXX IS A NUMBER LESS
150 ; THAN 20000. FOR UNMAPPED SYSTEMS, GIVE THE REAL PARTITION LIMITS.
151 ;
152 ; TO GET OFF THE GROUND, MCR>LOA XY:
153 ;-
154 ; MACROS TO CONSOLIDATE LOADABLE DRIVER CONDITIONAL ASSEMBLY
155 ;
156 ; IF NECESSARY, SAVE THE PS WORD FROM THE INTERRUPT (IT
157 ; CONTAINS THE UNIT NUMBER OF THE INTERRUPTER), SAVE R4 AND R5,
158 ; AND LOWER OUR PRIORITY. IF THE DRIVER IS LOADABLE AND MAPPED, ALL
159 ; OF THAT IS DONE BY ANOTHER PART OF THE EXEC (THE INTERRUPT CONTROL
160 ; BLOCK) SO IT DOES NOT HAVE TO BE DONE HERE
161 ; TYPE = DL, DH, DJ, OR DZ
162 ; PRI = PRIORITY TO CALL $INTSV WITH
163 ; NCTRLR = NUMBER OF CONTROLLERS
164 ;
165 .MACRO TTSAV$ TYPE,PRI,NCTRLR
166
167 .IF NDF L$$DRV!M$$MGE!LD$TT
168
169 .IF GT NCTRLR-1
170
171 MFPS TYPE'TMP
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 3-3
172
173 .ENDC
174
175 CALL $INTSV,PRI
176
177 .ENDC
178
179 JSR R3,TYPE'SAV
180
181 .ENDM
182 ;
183 ; GENERATE COMMON CODE FOR THE SAVE ROUTINES OF THE VARIOUS
184 ; DEVICES THIS DRIVER SUPPORTS. IF THIS DRIVER IS LOADABLE,
185 ; SOME OF THE CODE IS DONE BY ANOTHER PART OF THE EXEC (THE
186 ; INTERRUPT CONTROL BLOCK) SO IT DOES NOT HAVE TO BE DONE HERE.
187 ; TYPE= DL, DH, DJ, DZ
188 ; NCTRLR = NUMBER OF CONTROLLERS
189 ; MUX = NONNULL IF TO GENERATE FOR A MULTIPLEXER
190 ;
191 .MACRO TTSET$ TYPE,NCTRLR,MUX
192 MOV R3,-(SP)
193
194 .IF GT NCTRLR-1
195
196 .IF NDF L$$DRV!M$$MGE!LD$TT
197
198 MOV TYPE'TMP,R4
199 BIC #177760,R4
200 ASL R4
201
202 .ENDC
203
204 .IF NB MUX
205
206 MOV TYPE'TBL(R4),R3
207 MOV TYPE'CSR(R4),R4
208
209 .IFF
210
211 MOV CNTBL(R4),R5
212
213 .ENDC
214
215 .IFF
216
217 .IF NB MUX
218
219 MOV TYPE'TBL,R3
220 MOV TYPE'CSR,R4
221
222 .IFF
223
224 MOV CNTBL,R5
225
226 .ENDC
227
228 .ENDC
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 3-4
229
230 .ENDM
231 ;
232 ; MACRO LIBRARY CALLS
233 ;
234
235 .MCALL PCBDF$,TTSYM$
236 000000 PCBDF$ ;DEFINE PARTITION CONTROL BLOCK OFFSETS
237 000000 TTSYM$ ;DEFINE "TF.", "F1.", "F2.", "T.",
238 ; AND "TC." SYMBOLS
239
240 .IF DF D$$M11
241
242 .GLOBL U.DMCS ;REFERENCE SO SYMBOL WILL BE IN
243 ; TTDRV.STB FOR LOA.TSK
244
245 .ENDC
246
247 ;
248 ; THE SUBFUNCTION BIT IO.UMD (VALUE OF 4) SHOULD NEVER BE USED
249 ; TO INDICATE A TERMINAL SUBFUNCTION, BECAUSE IT FLAGS THE FUNCTION
250 ; AS A USER MODE DIAGNOSTIC. FUNCTION CODE 10 (10*400 IF YOU PREFER)
251 ; IS RESERVED FOR DIAGNOSTICS.
252 ;
253
254 000120 M$$CRI=80. ;NUMBER OF BYTES OF INFORMATION IN A MCR BUFFER
255
256 ;
257 ; EQUATED SYMBOLS
258 ;
259 ; FOR CONVENIENCE DEFINE AN INTERNAL CONDITIONAL ASSEMBLY SYMBOL
260 ;
261
262 .IF DF T$$UTB
263 .IF NDF C$$CKP!T$$BUF
264 NOEXBF=0 ;DEFINED IF TASK'S BUFFER TO BE USED FOR
265 ; CHARACTER BUFFERING AND SYSTEM CANNOT
266 ; CHECKPOINT
267 .ENDC
268 .ENDC
269
270 .IF DF T$$RNE!T$$RPR!T$$RST!T$$TRW
271
272 SS.RAL=200 ;SET IN S.STS IF READ ALL MODE
273 SS.WAL=100 ;SET IN S.STS IF WRITE ALL MODE
274 SS.RNE=40 ;SET IN S.STS IF READ WITH NO ECHO
275 SS.RST=20 ;SET IN S.STS IF READ WITH SPECIAL TERMINATORS
276
277 .ENDC
278
279 ;
280 ; TERMINAL CONTROL BLOCK OFFSET DEFINITIONS
281 ;
282
283 000000 STATS=0 ;TERMINAL STATUS WORD
284 000002 STRBF=2 ;CURRENT BUFFER ADDRESS (INPUT)
285 000004 RMBYT=4 ;REMAINING BYTES IN BUFFER (INPUT)
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 3-5
286 000005 FNBYT=5 ;FINAL (TERMINATING) BYTE OF A READ
287 000006 CURBF=6 ;STARTING BUFFER ADDRESS (INPUT)
288 000010 HORPS=10 ;HORIZONTAL POSITION OF CARRIAGE
289 000011 FLBYT=11 ;FILL BYTE
290 000012 MEBUF=12 ;MULTI-ECHO BUFFER ADDRESS
291 000014 MBUFR=14 ;DYNAMIC MULTI-ECHO BUFFER
292 000016 INPRQ=16 ;IF NONZERO, UNSOLICITED INPUT REQUEST
293 000017 MBUF0=17 ;ZERO BYTE TERMINATING DYNAMIC M-E BUFFER
294 000020 DFUIC=20 ;DEFAULT UIC OF TERMINAL
295 000022 DHBUF=22 ;DH11 OUTPUT BUFFER
296 000023 IHORP=23 ;INITIAL HORIZONTAL POSITION (T$$RUB)
297 000024 NEXTB=IHORP+1
298
299 000000 .IIF DF T$$ACR!T$$BTW!T$$CCA!T$$CCO!T$$ESC!T$$HLD, T1=0
300 .IF DF T1!T$$RPR!T$$SYN!T$$TRW!T$$UTB!T$$30P!T$$18S
301 000024 ATERS=NEXTB ;ADDITIONAL TERMINAL STATUS
302 000026 NEXTB=NEXTB+2
303 .ENDC
304 .IF DF T$$CCA&A$$TRP
305 000026 CCAST=NEXTB ;STARTING ADDRESS OF CONTROL C AST
306 000030 NEXTB=NEXTB+2
307 .ENDC
308 .IF DF T$$ESC
309 SYNTX=NEXTB ;ADDRESS OF CURRENT SYNTAX RULE FOR
310 NEXTB=NEXTB+2 ; ESCAPE SEQUENCES
311 .ENDC
312 .IF DF D$$M11
313 DMTIM=NEXTB ;TIME OUT COUNT ON REMOTE LINES
314 NEXTB=NEXTB+1
315 UDMVC=NEXTB ;VECTOR ADDR OF DM11 (USED BY LOA.TSK)
316 NEXTB=NEXTB+1
317 DMCSR=NEXTB ;CSR OF DM11 FOR THIS UNIT
318 ; U.DMCS=DMCSR ;DEFINED BY SGN. USED BY LOA.TSK
319 NEXTB=NEXTB+2
320 .ENDC
321
322 ;
323 ; TERMINAL STATUS WORD BIT DEFINITIONS
324 ;
325
326 100000 MODE=100000 ;MODE OF BUSY TERMINAL (0=INPUT 1=OUTPUT)
327 074000 LFCT=74000 ;UNPROCESSED LINE FEED COUNT FIELD
328 004000 LFBT=4000 ;UNPROCESSED LINE FEED ADD/SUB BIT
329 002000 CRTY=2000 ;CARRIAGE CONTROL AT END OF LINE (1=YES)
330 001000 CRJT=1000 ;CARRIAGE RETURN JUST TYPED (1=YES)
331 000400 EOLS=400 ;END OF LINE SEEN (1=YES)
332 000200 UIFP=200 ;UNSOLICITED INPUT FORK PENDING (1=YES)
333 000100 SOLI=100 ;SOLICITED INPUT (1=YES)
334 000040 CTLO=40 ;OUTPUT DISABLED (1=YES)
335 000020 RUBP=20 ;RUBOUT SEQUENCE IN PROGRESS (1=YES)
336 000017 FLCT=17 ;UNPROCESSED FILL COUNT FIELD
337 000001 FLBT=1 ;UNPROCESSED FILL COUNT BIT
338
339 ;
340 ; ADDITIONAL TERMINAL STATUS WORD BIT DEFINITIONS
341 ;
342
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 3-6
343 100000 RPRM=100000 ;SET IF CURRENT WRITE IS THE PROMPT FROM IO.RPR
344 040000 BTWQ=40000 ;SET IF A BREAKTHROUGH WRITE IS QUEUED
345 020000 BTWP=20000 ;SET IF A WRITE IS BREAKING THROUGH A READ
346 010000 CCPN=10000 ;SET IF A CONTROL C IS PENDING UNDER SPECIAL
347 ; CIRCUMSTANCES (T$$SYN, T$$HLD)
348 004000 BAKS=4000 ;SET IF SENDING EXIT HOLD-SCREEN MODE ESCAPE
349 ; SEQUENCE (T$$HLD)
350 002000 FKCR=2000 ;SET IF LAST CR WAS JUST TO DISPLAY A LONG
351 ; LINE ON MULTIPLE CRT LINES (T$$ACR)
352 001000 ECHO=1000 ;SET IF ECHOING IN PROGRESS (T$$30P)
353 000400 XOFF=400 ;SET IF XOFF TO BE SENT AT END OF PRESENT READ
354 ; (T$$RPR)
355 000200 UPND=200 ;SET IF DHBUF HOLDS BYTE SUPPRESSED BY XOFF
356 ; (T$$HLD, T$$SYN, T$$18S)
357 000100 CHAR=100 ;SET IF MBUFR HOLDS AN INPUT CHARACTER THAT
358 ; HAS BEEN RECEIVED BUT NOT ECHOED (T$$30P)
359 000040 WESC=40 ;SET IF ATTACHED TASK WANTS ESCAPE SEQUENCES
360 ; (T$$ESC)
361 000020 ESCS=20 ;SET IF IN MIDDLE OF AN ESCAPE SEQUENCE (T$$ESC)
362 000010 CCON=10 ;SET IF CONTROL C AST CODE IS ACTIVE (T$$CCA)
363 000004 MCTR=4 ;SET IF DOING CONTROL R FROM TASK'S BUFFER
364 ; (T$$CTR, T$$UTB)
365 000002 NCKP=2 ;SET IF SOLICITED INPUT REQUEST IS FROM
366 ; A NONCHECKPOINTABLE TASK (T$$UTB)
367 000001 UOFF=1 ;SET IF OUTPUT TURNED OFF BY AN XOFF
368 ; (T$$HLD, T$$SYN, T$$18S)
369
370 ;
371 ; MOST LOCAL DATA (SEE ALSO CNTBL)
372 ;
373 ; ESCAPE SEQUENCE SYNTAX TABLE
374 ;
375
376 .IF DF T$$ESC
377
378 SYNTAB: .BYTE 73,73 ;;;A ;
379 .WORD 265$ ;;;
380 .BYTE 77,77 ;;;A ?
381 .WORD 265$ ;;;
382 .BYTE 117,117 ;;;AN O
383 .WORD 270$ ;;;
384 .BYTE 120,120 ;;;A P
385 .WORD 265$ ;;;
386 .BYTE 131,131 ;;;A Y
387 .WORD 280$ ;;;
388 265$: .BYTE 40,57 ;;;AN INTERMEDIATE CHARACTER
389 .WORD 265$ ;;;
390 .BYTE 60,176 ;;;ANYTHING ELSE
391 .WORD 0 ;;;
392 270$: .BYTE 40,57 ;;;AN INTERMEDIATE CHARACTER
393 .WORD 270$ ;;;
394 .BYTE 100,176 ;;;SPECIAL O RANGE TERMINATOR
395 .WORD 0 ;;;
396 280$: .BYTE 40,176 ;;;FIRST COORDINATE (BIAS 40)
397 .WORD 290$ ;;;
398 290$: .BYTE 40,176 ;;;SECOND COORDINATE (BIAS 40)
399 .WORD 0 ;;;
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 3-7
400
401 .ENDC
402
403 .IF DF T$$GTS
404
405 ;
406 ; FORM THE WORDS RETURNED BY IO.GTS THAT INDICATE WHICH SYSGEN
407 ; OPTIONS ARE IN THIS DRIVER
408 ;
409
410 T2=0
411
412 .IF DF T$$ACR
413 T2=T2!F1.ACR
414 .ENDC
415 .IF DF T$$BTW
416 T2=T2!F1.BTW
417 .ENDC
418 .IF DF T$$BUF&C$$CKP
419 T2=T2!F1.BUF
420 .ENDC
421 .IF DF T$$CCA&A$$TRP
422 T2=T2!F1.UIA
423 .ENDC
424 .IF DF T$$CCO
425 T2=T2!F1.CCO
426 .ENDC
427 .IF DF T$$ESC
428 T2=T2!F1.ESQ
429 .ENDC
430 .IF DF T$$HLD
431 T2=T2!F1.HLD
432 .ENDC
433 .IF DF T$$LWC
434 T2=T2!F1.LWC
435 .ENDC
436 .IF DF T$$RNE
437 T2=T2!F1.RNE
438 .ENDC
439 .IF DF T$$RPR
440 T2=T2!F1.RPR
441 .ENDC
442 .IF DF T$$RST
443 T2=T2!F1.RST
444 .ENDC
445 .IF DF T$$RUB
446 T2=T2!F1.RUB
447 .ENDC
448 .IF DF T$$SYN
449 T2=T2!F1.SYN
450 .ENDC
451 .IF DF T$$TRW
452 T2=T2!F1.TRW
453 .ENDC
454 .IF DF T$$UTB
455 T2=T2!F1.UTB
456 .ENDC
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 3-8
457 .IF DF T$$VBF
458 T2=T2!F1.VBF
459 .ENDC
460
461 ;
462 ; ALL WORDS OF "T2" MUST BE CONTIGUOUS
463 ;
464
465 TCHR1: .WORD T2
466
467 T2=0 ;RSX-11M DOES NOT SUPPORT F2.DCH (DUMP/RESTORE
468 ; CHARACTERISTICS), RSX-11D STYLE IO.KIL
469 ; (F2.DKL), ALTS ECHOING AS "$" (F2.ALT),
470 ; OR SIMULATED FORM FEEDS (F2.SFF)
471
472 .IF DF T$$SMC
473 T2=T2!F2.SCH
474 .ENDC
475 .IF DF T$$GMC
476 T2=T2!F2.GCH
477 .ENDC
478
479 .WORD T2
480
481 TCHR1E=.
482
483 .ENDC ; DF T$$GTS
484
485 .IF DF T$$GMC!T$$SMC
486
487 ;
488 ; DATA STRUCTURES FOR GET AND SET MULTIPLE CHARACTERISTICS
489 ; TABLE 1 RUNS FROM U2.VT5 TO U2.L8S AND CONTAINS MASKS FOR
490 ; U.CW2 TO TEST FOR TERMINAL TYPE
491 ; TABLE 2 RUNS FROM U2.CRT TO U2.PRV AND CONTAINS MASKS FOR
492 ; U.CW2 TO TEST FOR TERMINAL STATES
493 ; TABLE 3 RUNS FROM TC.SCP TO TC.PRI AND CONTAINS WHAT CHARACTERISTICS
494 ; ARE RECOGNIZED BY SF.GMC AND SF.SMC
495 ; TABLE 4 RUNS FROM T.VT05 TO T.L180 AND CONTAINS WHAT TERMINAL
496 ; TYPES ARE RECOGNIZED BY SF.GMC AND SF.SMC
497 ;
498
499 .WORD 0 ;
500
501 .IF DF T$$18S
502 .WORD U2.L8S ;LA180S
503 .ENDC
504
505 .WORD U2.L3S ;LA30
506 .WORD U2.VT5 ;VT05
507 .WORD 0 ;
508 .WORD U2.PRV ;PRIVILIGED
509 .WORD U2.SLV ;SLAVE
510 .WORD U2.HLD ;HOLD-SCREEN MODE
511
512 .IF DF T$$RNE
513 .WORD U2.NEC ;NO ECHO MODE
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 3-9
514 .ENDC
515
516 .WORD U2.LWC ;LOWER TO UPPER CASE CONVERSION
517 .WORD U2.ESC ;CAN GENERATE ESCAPE SEQUENCES
518 .WORD U2.CRT ;CRT (SCOPE)
519 GMCTAB: ;
520 .BYTE TC.SCP ;SCOPE (CRT)
521 .BYTE TC.ESQ ;ESCAPE SEQUENCES
522 .BYTE TC.SMR ;LOWER TO UPPER CASE CONVERSION
523
524 .IF DF T$$RNE
525 .BYTE TC.NEC ;NO ECHO MODE
526 .ENDC
527
528 .BYTE TC.HLD ;HOLD-SCREEN MODE
529 .BYTE TC.SLV ;SLAVED
530 .BYTE TC.PRI ;PRIVILEGED
531 .BYTE T.VT05 ;VT05
532 .BYTE T.L30S ;LA30
533
534 .IF DF T$$18S
535 .BYTE T.L180 ;LA180S
536 .ENDC
537
538 .BYTE 0 ;
539
540 .ENDC ; DF T$$GMC!T$$SMC
541
542 ;
543 ; CONTROL OUTPUT MESSAGES
544 ;
545
546 000000 015 012 115 CTRLC: .ASCIZ <15><12>/MCR>/ ;
000003 103 122 076
000006 000
547 000007 136 125 015 CTRLU: .ASCIZ /^U/<15><12> ;MUST BE AFTER A ZERO BYTE
000012 012 000
548 000014 136 132 015 CTRLZ: .ASCIZ /^Z/<15><12> ;
000017 012 000
549
550 .IF DF T$$HLD
551
552 LEVHSM: .ASCIZ <33>/\/ ;LEAVE HOLD-SCREEN MODE
553
554 .ENDC
555
556 .IF DF T$$RUB
557
558 .ASCIZ <10><10><10><10><10><10><10><10> ;BACKSPACES
559 CRTBS=.-1 ;MUST BE AT END OF BACKSPACES
560 CRTRUB: .ASCIZ <10>/ /<10> ;BACKSPACE, SPACE, BACKSPACE
561
562 .ENDC
563
564 ;
565 ; LA30S CARRIAGE RETURN FILL TABLE
566 ;
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 3-10
567
568 000021 004 FILTB: .BYTE 4. ;0-8.
569 000022 010 .BYTE 8. ;9.-16.
570 000023 006 .BYTE 6. ;17.-24.
571 000024 003 .BYTE 3. ;25.-32.
572 000025 000 .BYTE 0. ;33.-40.
573 000026 002 .BYTE 2. ;41.-48.
574 000027 004 .BYTE 4. ;49.-56.
575 000030 006 .BYTE 6. ;57.-64.
576 000031 010 .BYTE 8. ;65.-72.
577 000032 012 .BYTE 10. ;73.-80.
578
579 .EVEN
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4
TERMINAL INITIATOR
581 .SBTTL TERMINAL INITIATOR
582
583 .IF DF T$$RPR!T$$BTW ; EB041
584 ; EB041
585 TTCHK: MOV R1,R3 ;SAVE START OF PACKET FOR $IOFIN ; EB041
586 ; EB041
587 .IF NDF T$$RPR ; EB041
588 ; EB041
589 BR 30$ ;SKIP AROUND CODE ; EB041
590 ; EB041
591 .ENDC ; EB041
592 ; EB041
593 .ENDC ; DF T$$RPR!T$$BTW ; EB041
594
595 .IF DF T$$RPR
596
597 ;+
598 ; **-TTCHK-TERMINAL DRIVER SPECIAL PARAMETER CHECKING
599 ;
600 ; ENTRY HERE FROM DRQIO WHEN A QIO FOR THE TERMINAL DRIVER HAS BEEN
601 ; CHECKED. A READ-WITH-PROMPT QIO HAS A SECOND BUFFER
602 ; SPECIFICATION THAT NEEDS TO BE CHECKED IN THE CONTEXT OF THE
603 ; ISSUING TASK. IF NECESSARY, DO THE CHECKS. ALWAYS QUEUE THE REQUEST.
604 ;
605 ; INPUTS:
606 ;
607 ; R1 -> I/O REQUEST PACKET
608 ; R4 -> SCB
609 ; R5 -> UCB
610 ;
611 ; OUTPUTS:
612 ;
613 ; THE PROMPT (WRITE) BUFFER IS ADDRESS CHECKED TO MAKE SURE IT
614 ; LIES WITHIN THE ISSUING TASK. IF IT DOES, THE BUFFER ADDRESS
615 ; IS RELOCATED AND STORED IN THE I/O PACKET, THE PACKET IS
616 ; INSERTED IN THE CONTROLLER QUEUE, AND THE DEVICE INITIATOR
617 ; IS ENTERED TO START THE CONTROLLER.
618 ;-
619
620 CMPB #IO.RPR/400,I.FCN+1(R1) ;QIO NEED SPECIAL CHECKING?
621
622 .IF DF T$$BTW
623
624 BNE 30$ ;IF NE NO
625
626 .IFF
627
628 BNE 20$ ;IF NE NO -- JUST QUEUE IT
629
630 .ENDC
631
632 MOV I.PRM+10(R3),R0 ;GET VIRTUAL ADDRESS OF BUFFER
633
634 .IF DF A$$CHK!M$$MGE
635
636 MOV I.PRM+12(R3),R1 ;GET LENGTH OF BUFFER
637 BEQ 8$ ;MUST PROMPT WITH AT LEAST 1 CHAR
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-1
TERMINAL INITIATOR
638 ; EB090
639 .IF DF T$$VBF ; EB090
640 ; EB090
641 CMP #255.,R1 ;PROMPT BIGGER THAN LARGEST BUFFER? ; EB090
642 ; EB090
643 .IFF ; EB090
644 ; EB090
645 CMP #80.,R1 ;PROMPT BIGGER THAN LARGEST BUFFER? ; EB090
646 ; EB090
647 .IFTF ; EB090
648 ; EB090
649 BHIS 7$ ;IF HIS NO ; EB090
650 MOV #IE.BAD&377,R0 ;RETURN BAD PARAMETER STATUS ; EB090
651 BR 9$ ; ; EB090
652 ; EB090
653 .ENDC ; EB090
654 ; EB090
655 7$: CALL $ACHKB ;ADDRESS CHECK BUFFER ; EB090
656 BCC 10$ ;IF CC OKAY
657 8$: MOV #IE.SPC&377,R0 ;RETURN ILLEGAL BUFFER STATUS
658 9$: CLR R1 ;SET IOSB+2 TO ZERO
659 CALLR $IOFIN ;FINISH I/O OPERATION
660 10$: ;REF LABEL
661
662 .ENDC
663
664 CALL $RELOC ;RELOCATE BUFFER ADDRESS
665 MOV R1,I.PRM+10(R3) ;SET RELOCATION BIAS OF BUFFER
666 MOV R3,R1 ;COPY I/O PACKET ADDRESS
667 ADD #I.PRM+14,R3 ;POINT INTO I/O PACKET
668 MOV (R3)+,(R3) ;SAVE VERTICAL FORMAT CONTROL
669 CMP -(R3),-(R3) ;POINT AT PROMPT BUFFER SIZE
670 MOV (R3)+,(R3) ;MOVE BUFFER SIZE TO SAFETY
671 MOV R2,-(R3) ;SET ADDRESS OF BUFFER
672
673 .ENDC ; DF T$$RPR
674
675 .IF DF T$$RPR!T$$BTW
676
677 20$: MOV R4,R0 ;SET ADDRESS OF I/O QUEUE LISTHEAD
678 CALL $QINSP ;INSERT I/O PACKET IN REQUEST QUEUE
679 23$: JMP TTINI ;GO TO WORK
680
681 .ENDC
682
683 .IF DF T$$BTW
684
685 30$: CMPB #IO.WLB/400,I.FCN+1(R1) ;A WRITE?
686 BNE 20$ ;IF NE NO -- JUST QUEUE IT
687 BITB #TF.WBT,I.FCN(R1) ;A BREAKTHROUGH WRITE?
688 BEQ 20$ ;IF EQ NO -- JUST QUEUE IT
689
690 .IF DF M$$MUP
691
692 MOV I.TCB(R1),R2 ;GET TCB OF REQUESTING TASK
693 BIT #T3.PRV,T.ST3(R2) ;IS IT PRIVILEGED
694 BEQ 35$ ;IF EQ NO
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-2
TERMINAL INITIATOR
695
696 .ENDC
697 ; EB057
698 .IF DF D$$M11&D$$H11!D$$ZMD ; EB057
699 ; EB057
700 MOV #IE.DNR&377,R0 ;ASSUME WRITING TO DISABLED LINE ; EB057
701 BITB #US.DSB,U.STS(R5) ;IS LINE DISABLED? ; EB057
702 BNE 9$ ;IF NE YES -- REJECT PACKET ; EB057
703 ; EB057
704 .ENDC ; EB057
705
706 BISB #TF.CCO,I.FCN(R1) ;IO.WBT IMPLIES CANCEL CONTROL O
707
708 .IF DF T$$HLD!T$$SYN!T$$18S
709
710 BIC #UOFF,U.CNT+2+ATERS(R5) ;IGNORE ANY XOFF'S
711
712 .ENDC ; EB019
713
714 MTPS S.PRI(R4) ;DISALLOW INTERRUPTS ; EB019
715 BISB #US.ECH,U.STS(R5) ;;;DISALLOW INPUT (BUSYING OF UNIT) ; EB019
716 TSTB U.STS(R5) ;DRIVER DOING ANYTHING?
717 BMI 40$ ;IF MI YES (RATS!)
718 32$: ;REF LABEL
719 BIS #BTWQ,U.CNT+2+ATERS(R5) ;SHOW IO.WBT IN QUEUE
720 MOV (R4),(R1) ;QUEUE THIS AS FIRST IN QUEUE
721 BNE 3400$ ;IF NE ANOTHER PACKET IN QUEUE
722 MOV R1,2(R4) ;MAKE "LAST" POINT AT THIS PACKET
723 3400$: MOV R1,(R4) ;
724 MTPS #0 ;;;REDUCE PRIORITY ; EB019
725 BR 23$ ;HANDLE IT NORMALLY
726
727 .IF DF M$$MUP
728
729 35$: MOV #IE.PRI&377,R0 ;IO.WBT ILLEGAL FROM UNPRIVILEGED TASK
730 BR 9$ ; IN A MULTIUSER PROTECTION SYSTEM
731
732 .ENDC
733
734 40$: BIT #SOLI!MODE,U.CNT+2+STATS(R5) ;SOLICITED INPUT OR OUTPUT
735 ; IN PROGRESS?
736 BNE 41$ ;IF NE YES
737 MOV U.CNT+2+STRBF(R5),R0 ;POINT AT UNSOLICITED INPUT BUFFER
738 BR 46$ ;PRESS ON
739 41$: MOV S.PKT(R4),R0 ;GET START OF PACKET THAT IS BEING
740 ; PROCESSED
741 BIT #RPRM!BTWP,U.CNT+2+ATERS(R5) ;;;BREAKING THROUGH OR ; EB019
742 ;;; PROMPTING? ; EB019
743 BEQ 43$ ;;;IF EQ NO ; EB019
744 MOV #IE.RSU&377,R0 ;;;UNSHARABLE RESOURCE IN USE (CANNOT ; EB019
745 ; IO.WBT WHILE IO.WBTING OR PROMPTING)
746 CALL INPT0 ;;;CLEAR US.ECH ; EB019
747 MTPS #0 ;;;REDUCE PRIORITY ; EB019
748 ; EB019
749 .IF DF A$$CHK!M$$MGE&T$$RPR ; EB019
750 ; EB019
751 BR 9$ ; ; EB019
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-3
TERMINAL INITIATOR
752 ; EB019
753 .IFF ; EB019
754 ; EB019
755 9$: CLR R1 ;WANT IOSB+2 TO BE ZERO ; EB019
756 CALLR $IOFIN ;FINISH OFF I/O PACKET
757
758 .ENDC
759
760 43$: CMPB #IO.RLB/400,I.FCN+1(R0) ;;;DOING A READ? ; EB019
761 BEQ 46$ ;;;IF EQ YES -- BREAKTHROUGH ; EB019
762 ; EB019
763 .IIF NE UPND-200, .ERROR UPND ; EB019
764 ; EB019
765 TSTB U.CNT+2+ATERS(R5) ;;;HAVE A HELD UP CHARACTER? ; EB019
766 BPL 32$ ;;;IF PL NO ; EB019
767 BIC #UPND,U.CNT+2+ATERS(R5) ;;;CLEAR PENDING FLAG ; EB019
768 MOV #45$,-(SP) ;;;WANT TO RETURN TO 45$ ; EB019
769 MOVB U.CNT+2+DHBUF(R5),-(SP) ;;;RETRIEVE HELD UP CHARACTER ; EB019
770 CALLR FCHAR ;;;FORCE IT OUT ; EB019
771 45$: MOV U.SCB(R5),R4 ;;;RESTORE THE MESSED UP REGISTER ; EB019
772 BR 32$ ;;;DO THIS IO.WBT AS NEXT FUNCTION ; EB019
773 46$: MOV R5,R3 ;POINT AT TERMINAL STATUS
774 ADD #U.CNT+2+STATS,R3 ;
775 BIT #EOLS,(R3) ;;;HAS THE READ "FINISHED"? ; EB019
776 BNE 32$ ;;;IF NE YES -- JUST QUEUE BREAKTHROUGH ; EB019
777 BIT #SOLI,(R3) ;SOLICITED INPUT GOING ON?
778 BNE 48$ ;IF NE YES
779 MOV (R3),-(R0) ;SAVE TERMINAL STATUS FOR UNSOL READ
780 BIC #LFCT!CRTY!CRJT!CTLO!FLCT,(R0) ;;;MAKE SAVED STATUS ; EB019
781 ;;; SHOW INACTIVE ON OUTPUT ; EB019
782 CLR I.PRM+16(R1) ;SIGNAL UNSOLICITED READ BREAKTHROUGH
783 SUB #U.CNT+2+STATS-U.BUF,R3 ;POINT AT U.BUF
784 BR 50$ ;
785 48$: MOVB S.STS(R4),(R0) ;SAVE STATUS OF DISPLACED READ
786 MOV R0,I.PRM+16(R1) ;SAVE POINTER TO DISPLACED PACKET
787 ADD #I.PRM+14,R0 ;POINT NEAR END OF DISPLACED PACKET
788 MOV (R3),(R0) ;SAVE STATS
789 BIC #LFCT!CRTY!CRJT!CTLO!FLCT,(R0) ;;;MAKE SAVED STATS ; EB019
790 ;;; SHOW INACTIVE ON OUTPUT ; EB019
791
792 ; NEXT INSTUCTION DEPENDS ON STATS=U.CNT+2
793
794 MOV -(R3),-(R0) ;SAVE U.CNT
795 MOV -(R3),-(R0) ;SAVE U.BUF+2
796 MOV -(R3),-(R0) ;SAVE U.BUF
797 50$: MOV I.PRM(R1),(R3)+ ;RESET U.BUF FOR IO.WBT
798 MOV I.PRM+2(R1),(R3)+ ;RESET U.BUF+2
799 MOV I.PRM+4(R1),(R3)+ ;RESET U.CNT
800 MOV R1,S.PKT(R4) ;MAKE IO.WBT THE CURRENT I/O PACKET
801 BIC #CTLO!LFCT!CRTY!EOLS!RUBP!SOLI,(R3) ;;;RESET ; EB019
802 BIS #MODE!FLBT,(R3) ;;; STATUS WORD FOR IO.WBT ; EB019
803 MOV #CTRLU-1,MEBUF(R3) ;;;JUST IN CASE, KILL MULTIECHO. ; EB019
804 ;;;(CANNOT AVOID KILLING "MCR>") ; EB019
805 BIS #BTWP,ATERS(R3) ;FLAG IO.WBT ACTION
806 JMP FWRITE ;DO THE WRITE
807
808 .ENDC
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-4
TERMINAL INITIATOR
809
810 .ENABL LSB
811
812 .IF DF T$$GMC!T$$SMC
813
814 1840$: TST (SP)+ ;DESTROY SAVED R3
815 SUB #2,U.CNT(R5) ;FINISHED DECIPHERING BUFFER?
816 BLT 1846$ ;IF LT YES
817 MOV #GMCTAB,R2 ;POINT AT RECOGNITION TABLE
818 MOV R2,R1 ;COPY THE POINTER
819 CALL $GTBYT ;GET BYTE TO DECIPHER
820 1842$: TST -(R1) ;TABLE OF CHARACTERISTICS EXHAUSTED?
821 BEQ 1850$ ;IF EQ YES
822 CMPB (R2)+,(SP) ;RECOGNIZE CHARACTERISTIC?
823 BNE 1842$ ;IF NE NO
824 SEC ;SET C-BIT TO SHOW TC. MATCH
825 1844$: RTS R3 ;
826 1846$: JMP 5$ ;RETURN WITH IOSB+2 = 0
827 1850$: CMPB #TC.TTP,(SP) ;WORRYING ABOUT TERMINAL TYPE?
828 BEQ 1844$ ;IF EQ YES (C-BIT IS CLEAR)
829 1852$: MOV #SE.NIH*400!<IE.ABO&377>,R0 ;DID NOT RECOGNIZE BYTE
830 1854$: MOV S.PKT(R4),R3 ;POINT AT I/O PACKET
831 MOV U.BUF+2(R5),R1 ;PICK UP WHERE WE STOPPED IN BUFFER
832 ; (ASSUME BUFFER < 4096.-32. BYTES)
833 SUB I.PRM+2(R3),R1 ;STOPPING POINT - START OF BUFFER
834 DEC R1 ;ADJUST
835 TST (SP)+ ;CLEAN UP STACK
836
837 .IF DF T$$GTS
838
839 BR 1868$ ;RETURN AN ERROR TO THE TASK
840
841 .IFF
842
843 JMP IODON ;RETURN AN ERROR TO THE TASK
844
845 .ENDC
846
847 .ENDC ; DF T$$GMC!T$$SMC
848
849 000034 1860$: ;REF LABEL
850
851 .IF DF T$$GMC!T$$SMC&A$$CHK!T$$GTS
852
853 MOV U.CNT(R5),R3 ;COPY LENGTH OF BUFFER
854
855 .ENDC
856
857 .IF DF T$$GMC!T$$GTS!T$$SMC&A$$CHK
858
859 BIT #1,U.BUF+2(R5) ;BUFFER ON A BYTE BOUNDARY?
860
861 .IF DF T$$CCA&A$$TRP
862
863 BNE 1908$ ;IF NE YES
864
865 .IFF
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-5
TERMINAL INITIATOR
866
867 BEQ 1862$ ;IF EQ NO
868 1908$: MOV #IE.SPC&377,R0 ;ILLEGAL BUFFER
869
870 .IF DF T$$GMC!T$$SMC
871
872 BR 1846$ ;
873
874 .IFF
875
876 JMP 5$ ;
877
878 .ENDC
879
880 1862$: ;REF LABEL
881
882 .ENDC ; DF T$$CCA&A$$TRP
883
884 BIT #1,R3 ;BUFFER CONTAINS WORDS?
885 BNE 1908$ ;IF NE NO
886 CMP #4096.-32.,R3 ;BUFFER TOO LARGE
887 BLT 1908$ ;IF LT YES -- MIGHT BLOW ERROR OFFSET
888 ; ON A MAPPED SYSTEM
889
890 .ENDC ; DF T$$GMC!T$$GTS!T$$SMC&A$$CHK
891
892 .IF DF T$$GTS
893
894 CMPB #IO.GTS,I.FCN(R1) ;GET TERMINAL SUPPORT QIO?
895 BNE 1870$ ;IF NE NO
896 CMP #TCHR1E-TCHR1,R3 ;WANTS MORE THAN WE DELIVER?
897 BGE 1863$ ;IF GE NO
898 MOV #TCHR1E-TCHR1,R3 ;CHANGE TO OUR MAXIMUM
899 1863$: MOV #TCHR1,R2 ;POINT AT SUPPORT INFO WORDS
900 CLR R1 ;CLEAR COUNTER OF MOVED BYTES
901 1864$: MOVB (R2)+,-(SP) ;PUT THE 1ST BYTE OF THE 1ST
902 CALL $PTBYT ; SUPPORT WORD INTO THE TASK'S BUFFER
903 INC R1 ;COUNT A BYTE MOVED
904 CMP R1,R3 ;TASK WANTS MORE?
905 BLT 1864$ ;IF LT YES
906 1868$: JMP IODON ;RETURN STATUS
907 1870$: ;REF LABEL
908
909 .ENDC
910
911 .IF DF T$$SMC
912
913 CMPB #SF.SMC,I.FCN(R1) ;SET MULTIPLE CHARACTERISTICS?
914 BNE 1880$ ;IF NE NO
915
916 .IF DF M$$MUP
917
918 MOV I.TCB(R1),R3 ;POINT AT TCB OF REQUESTING TASK
919 CMP T.UCB(R3),R5 ;IS TASK'S TI: THIS TERMINAL?
920 BEQ 1872$ ;IF EQ YES -- ALMOST ANYTHING IS LEGAL
921 BIT #T3.PRV,T.ST3(R3) ;IS THE TASK PRIVILEGED
922 BNE 1872$ ;IF NE YES -- ALMOST ANYTHING IS LEGAL
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-6
TERMINAL INITIATOR
923 MOV #IE.PRI&377,R0 ;PRIVILEGE VIOLATION
924 BR 1846$ ;
925
926 .ENDC
927
928 1872$: JSR R3,1840$ ;DECIPHER MEANING OF THEIR
929 ; CHARACTERISTICS BYTE
930 BCC 1876$ ;IF CC WORRY ABOUT TERMINAL TYPE
931 CALL $GTBYT ;GET DESIRED VALUE FOR CHARACTERISTIC
932 CMP #U2.PRV,(R1) ;TASK TRYING TO CHANGE PRIVILEGE STATUS?
933 BEQ 1852$ ;IF EQ YES -- DO NOT ALLOW THAT
934 BITB #376,(SP) ;VALUE IS 1 OR 0?
935 BEQ 1873$ ;IF EQ YES
936 MOV #SE.BIN*400!<IE.ABO&377>,R0 ;IT SHOULD HAVE BEEN
937 BR 1854$ ;
938 1873$: BIC (R1),U.CW2(R5) ;ASSUME THE VALUE IS ZERO
939 1874$: TSTB (SP)+ ;IS THE VALUE ZERO?
940 BEQ 1872$ ;IF EQ YES
941 1875$: BIS (R1),U.CW2(R5) ;SET THE APPROPRIATE BIT
942 BR 1872$ ;TRY TO DECIPHER THEIR NEXT BYTE
943 1876$: CALL $GTBYT ;GET DESIRED TERMINAL TYPE VALUE
944 1877$: TST -(R1) ;EXHAUSTED LIST OF RECOGNIZIBLE VALUES?
945 BNE 1878$ ;IF NE NO
946 CMPB #T.UNK0,(SP) ;SET TERMINAL TO UNKNOWN TYPE?
947 BEQ 1879$ ;IF EQ YES
948 MOV #SE.VAL*400!<IE.ABO&377>,R0 ;SHOW INAPPROPRIATE VALUE
949 BR 1854$ ;
950 1878$: CMPB (R2)+,(SP) ;RECOGNIZE THE TERMINAL TYPE VALUE?
951 BNE 1877$ ;IF NE NO
952 1879$: BIC #U2.VT5!U2.L3S,U.CW2(R5) ;IGNORE OLD TERMINAL TYPE
953 BR 1874$ ;SET THEIR TYPE [(SP) IS NONZERO]
954 1880$: ;REF LABEL
955
956 .ENDC
957
958 .IF DF T$$GMC
959
960 CMPB #SF.GMC,I.FCN(R1) ;GET MULTIPLE CHARACTERISTICS?
961 BNE 1888$ ;IF NE NO
962 1882$: JSR R3,1840$ ;FIND OUT WHAT CHARACTERISTIC THEY
963 ; ARE INQUIRING ABOUT
964 BCC 1884$ ;IF CC WANT TO KNOW THE TERMINAL TYPE
965 CLR -(SP) ;ASSUME CHARACTERISTIC NOT ASSERTED
966 BIT (R1),U.CW2(R5) ;CHARACTERISTIC ASSERTED?
967 BEQ 1883$ ;IF EQ NO
968 INC (SP) ;REMEMBER ITS BEING ASSERTED
969 1883$: CALL $PTBYT ;PUT VALUE INTO TASK'S BUFFER
970 BR 1882$ ;TRY AGAIN
971 1884$: MOVB #T.UNK0,-(SP) ;ASSUME UNKNOWN TERMINAL TYPE
972 1885$: TSTB (R2)+ ;TERMINAL TYPE TABLE EXHAUSTED?
973 BEQ 1883$ ;IF EQ YES
974 BIT -(R1),U.CW2(R5) ;IS THIS TERMINAL THIS TYPE?
975 BEQ 1885$ ;IF EQ NO
976 MOVB -(R2),(SP) ;PICK UP THE TERMINAL TYPE
977 BR 1883$ ;RETURN IT TO THE TASK
978 1888$: ;REF LABEL
979
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-7
TERMINAL INITIATOR
980 .ENDC
981
982 .IF DF T$$GMC!T$$GTS!T$$SMC
983
984 MOV #IE.IFC&377,R0 ;NO OTHER SUBFUNCTIONS ARE SUPPORTED
985 BR 304$ ;
986 1889$: BR 1860$ ;
987
988 .ENDC
989
990 .IF DF T$$CCA&A$$TRP
991
992 ;
993 ; SET UP FOR UNSOLICITED CHARACTER AST
994 ;
995
996 000034 016163 000000G 000026 1900$: MOV I.PRM(R1),CCAST(R3) ;SAVE AST ENTRY POINT ADDRESS ; EB092
997 000042 001410 BEQ 1908$ ;IF EQ BAD ADDRESS ; EB092
998 000044 032763 000001 000026 BIT #1,CCAST(R3) ;IS ADDRESS ODD? ; EB092
999 000052 001004 BNE 1908$ ;IF NE YES ; EB092
1000 000054 052763 000010 000024 BIS #CCON,ATERS(R3) ;ARM UNSOLICITED CHAR AST CODE ; EB092
1001 000062 000402 BR 1910$ ; ; EB092
1002 000064 012700 000000C 1908$: MOV #IE.SPC&377,R0 ;THERE'S NO POINT IF NO
1003 000070 000455 1910$: BR 304$ ; AST ADDRESS
1004
1005 .ENDC
1006
1007 .IF DF T$$RPR
1008
1009 ;
1010 ; START ANALYSIS OF READ AFTER PROMPT QIO FOR SUBFUNCTIONS
1011 ;
1012
1013 1920$: MOV #RPRM,-(SP) ;COPY BIT PATTERN FOR ATERS
1014 BITB #TF.XOF,I.FCN(R1) ;XOFF TERMINATION SUBFUNCTION?
1015 BEQ 1922$ ;IF EQ NO ; EB090
1016 BIS #XOFF,(SP) ;REMEMBER NEED FOR XOFF
1017 1922$: BIS (SP)+,ATERS(R3) ;SET STATUS FOR LATER REFERENCE
1018 CMP I.PRM+14(R1),U.CNT(R5) ;PROMPT BUFFER LONGER THAN READ?
1019 BLE 1924$ ;IF LE NO
1020 MOV I.PRM+14(R1),U.CNT(R5) ;WANT TO ALLOCATE EXECUTIVE
1021 1924$: BR 305$ ; BUFFER THAT IS BIG ENOUGH FOR EITHER
1022
1023 .ENDC
1024
1025 ;+
1026 ; **-TTINI-TERMINAL INTITIATOR
1027 ;
1028 ; THIS ROUTINE IS ENTERED FROM THE QUEUE I/O DIRECTIVE WHEN AN I/O REQUEST
1029 ; IS QUEUED AND AT THE END OF A PREVIOUS I/O OPERATION TO PROPAGATE THE EXECU-
1030 ; TION OF THE DRIVER. IF THE SPECIFIED CONTROLLER IS NOT BUSY, THEN AN ATTEMPT
1031 ; IS MADE TO DEQUEUE THE NEXT I/O REQUEST. ELSE A RETURN TO THE CALLER IS
1032 ; EXECUTED. IF THE DEQUEUE ATTEMPT IS SUCCESSFUL, THEN THE NEXT I/O OPER-
1033 ; ATION IS INITIATED. A RETURN TO THE CALLER IS THEN EXECUTED.
1034 ;
1035 ; INPUTS:
1036 ;
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-8
TERMINAL INITIATOR
1037 ; R5=ADDRESS OF THE UCB OF THE CONTROLLER (UNIT) TO BE INITIATED.
1038 ;
1039 ; OUTPUTS:
1040 ;
1041 ; IF THE SPECIFIED CONTROLLER IS NOT BUSY AND AN I/O REQUEST IS WAIT-
1042 ; ING TO BE PROCESSED, THEN THE REQUEST IS DEQUEUED AND THE I/O OPER-
1043 ; ATION IS INITIATED.
1044 ;
1045 ; SEE THE I/O DRIVERS REFERENCE MANUAL FOR A DETAILED DESCRIPTION
1046 ; OF WHAT THIS DRIVER SUPPORTS. IN BRIEF:
1047 ;
1048 ; A$$CHK = ADDRESS CHECKING (GOES WITH T$$RPR, T$$GMC, T$$SMC, T$$GTS) ; EB090
1049 ; A$$TRP = AST SUPPORT IN SYSTEM (GOES WITH T$$CCA)
1050 ; C$$CKP = CHECKPOINT SUPPORT IN SYSTEM (GOES WITH T$$BUF)
1051 ; D$$H11 = DH11 MULTIPLEXERS
1052 ; D$$J11 = DJ11 MULTIPLEXERS
1053 ; D$$L11 = DL11/A/B/C/D
1054 ; D$$M11 = DM11-BB MODEM CONTROLLER FOR DH11
1055 ; D$$YNC = DYNAMIC CHECKPOINTING (GOES WITH C$$CKP AND T$$BUF)
1056 ; D$$YNM = DYNAMIC MEMORY MANAGEMENT IN SYSTEM (GOES WITH M$$MGE,
1057 ; C$$CKP, AND T$$BUF)
1058 ; D$$ZMD = BELL 103A MODEM CONTROL FOR DZ11 LINES
1059 ; D$$Z11 = DZ11 MULTIPLEXER
1060 ; I$$RAR = REMOVE AFTER RUNNING (GOES WITH I$$RDN AND M$$MGE) ; EB011
1061 ; I$$RDN = I/O RUNDOWN (GOES WITH I$$RAR AND M$$MGE) ; EB011
1062 ; LD$$H, LD$$J, LD$$L, LD$$Z = VARIOUS FLAVORS OF LOADABLE USER DRIVERS
1063 ; (NOT SUPPORTED)
1064 ; LD$TT = DEFINED IF TERMINAL DRIVER IS LOADABLE
1065 ; L$$DRV = DEFINED IF LOADABLE TERMINAL DRIVER SUPPORT IN SYSTEM
1066 ; L$$SI1 = LSI-11 SUPPORT. EFFECTS MTPS MACRO.
1067 ; (DH11, DJ11, DM11, AND DZ11 ARE NOT COMPATIBLE WITH Q-BUS)
1068 ; L$$50H = FIFTY HERTZ VT05 SUPPORT
1069 ; M$$MGE = MEMORY MANAGEMENT SUPPORT
1070 ; M$$MUP = AUTOMATIC "BYE" ON DM11 AND DZ11 HANGUPS AND PRIVILEGE CHECKS
1071 ; P$$LAS = MEMORY MANAGEMENT DIRECTIVES ; EB041
1072 ; R$$LKL = RMS-11 LOCKING ; EB030
1073 ; R$$11S = IGNORE UNSOLICITED INPUT ON RSX-11S SYSTEMS THAT HAVE
1074 ; NO BASIC MCR
1075 ; T$$ACR = AUTOMATIC CR/LF FOR LINES THAT ARE BIGGER THAN TERMINAL
1076 ; BUFFER SIZE (U.CW4)
1077 ; T$$BTW = BREAKTHROUGH WRITE
1078 ; T$$BUF = CHECKPOINTING DURING TERMINAL INPUT (GOES WITH C$$CKP)
1079 ; T$$CCA = UNSOLICITED CHARACTER AST'S (GOES WITH A$$TRP)
1080 ; T$$CCO = CLEAR CONTROL O INHIBIT BEFORE DOING WRITE
1081 ; T$$CTR = CONTROL R DISPLAYS THE INTERPRETED INCOMPLETE INPUT BUFFER
1082 ; T$$ESC = RECOGNITION OF ESCAPE SEQUENCES FOR SOLICITED READS
1083 ; T$$GMC = GET MULTIPLE TERMINAL CHARACTERISTICS
1084 ; T$$GTS = GET TERMINAL DRIVER SUPPORT MASKS
1085 ; T$$HLD = HOLD-SCREEN MODE SUPPORT (ALMOST T$$SYN SUPPORT) AND
1086 ; CONTROL C KNOCKS TERMINAL OUT OF IT. INTERACTS WITH MCR.
1087 ; T$$LWC = LOWER CASE TO UPPER CASE MAPPING ON INPUT AND RECOGNITION
1088 ; OF 175 AND 176 AS ASCII CHARACTERS
1089 ; T$$MIN = DEFINED IN THE MINIMUM TERMINAL DRIVER AND THE MINIMUM
1090 ; MULTIUSER DRIVER (ALONG WITH T$$BTW, T$$RNE, T$$RST)
1091 ; T$$NCO = DON'T PROCESS CONTROL/O IN DRIVER ; SR001
1092 ; T$$RNE = READ WITH NO ECHO
1093 ; T$$RPR = READ AFTER PROMPT
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-9
TERMINAL INITIATOR
1094 ; T$$RST = READ WITH SPECIAL TERMINATORS
1095 ; T$$RUB = RUBOUTS ERASE PRINTING CHARACTERS AND TABS ON CRT'S
1096 ; T$$SMC = SET MULTIPLE TERMINAL CHARACTERISTICS
1097 ; T$$SYN = CTRL S AND Q SUPPORT. CTRL C CLEARS EFFECT OF CTRL S.
1098 ; T$$TRW = TRANSPARENT READS AND WRITES
1099 ; T$$UTB = WHEN POSSIBLE, RECEIVED CHARACTERS ARE PUT DIRECTLY INTO THE
1100 ; TASK'S BUFFER
1101 ; T$$VBF = VARIABLE LENGTH BUFFERS (FROM 1 BYTE TO 255.) ARE USED BY THE
1102 ; DRIVER
1103 ; T$$18S = FORM FEEDS ARE PASSED THROUGH ON OUTPUT (REQUIRES MUCH OF
1104 ; T$$SYN CODE)
1105 ; T$$30P = ONE CHARACTER SOFTWARE BUFFERING OF RECEIVED CHARACTERS
1106 ; (NEEDED ONLY BY LA30P'S BECAUSE THEIR INTERFACES ARE NOT
1107 ; HARDWARE DOUBLE BUFFERED).
1108 ;-
1109
1110 .IIF NE UIFP-200, .ERROR UIFP
1111
1112 000072 105765 000002G 1$: TSTB U.CNT+2+STATS(R5) ;UNSOLICITED INPUT FORK PENDING?
1113 000076 100406 BMI 2$ ;IF MI YES -- WAIT FOR FORK
1114 000100 016504 000000G MOV U.SCB(R5),R4 ;POINT TO SCB
1115 000104 CALLR TINP1 ;START UNSOLICITED READ ; EB091
1116
1117 ; NEXT INSTRUCTION DEPENDS ON US.BSY=200
1118
1119 000110 105765 000000G TTINI: TSTB U.STS(R5) ;UNIT BUSY?
1120 000114 100454 2$: BMI 900$ ;IF MI YES
1121 000116 152765 000000G 000000G BISB #US.ECH,U.STS(R5) ;IGNORE INPUT CHARACTERS
1122
1123 .IF DF T$$BTW
1124
1125 BIT #BTWQ,U.CNT+2+ATERS(R5) ;AN IO.WTB QUEUED?
1126 BNE 3$ ;IF NE YES -- DO BEFORE UNSOL CHAR
1127
1128 .ENDC
1129
1130 000124 105765 000020G TSTB U.CNT+2+INPRQ(R5) ;UNSOLICITED INPUT REQUEST?
1131 000130 001360 BNE 1$ ;IF NE YES
1132 000132 3$: CALL $GTPKT ;GET AN I/O PACKET TO PROCESS
1133
1134 .IF DF T$$MIN
1135
1136 000136 103451 BCS 28$ ;IF CS CONTROLLER BUSY OR NO REQUEST
1137 ;SO CLEAR ECHO-IN-PROGRESS AND EXIT
1138
1139 .IFF
1140
1141 BCS 9$ ;IF CS CONTROLLER BUSY OR NO REQUEST
1142 ; SO CLEAR ECHO-IN-PROGRESS AND EXIT
1143
1144 .ENDC
1145
1146 ;
1147 ; THE FOLLOWING ARGUMENTS ARE RETURNED BY $GTPKT:
1148 ;
1149 ; R1=ADDRESS OF THE I/O REQUEST PACKET.
1150 ; R2=PHYSICAL UNIT NUMBER OF THE REQUEST UCB.
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-10
TERMINAL INITIATOR
1151 ; R3=CONTROLLER INDEX.
1152 ; R4=ADDRESS OF THE STATUS CONTROL BLOCK.
1153 ; R5=ADDRESS OF THE UCB OF THE CONTROLLER (UNIT) TO BE INITIATED.
1154 ;
1155 ; TERMINAL I/O REQUEST PACKET FORMAT:
1156 ;
1157 ; WD. 00 -- I/O QUEUE THREAD WORD.
1158 ; WD. 01 -- REQUEST PRIORITY, EVENT FLAG NUMBER.
1159 ; WD. 02 -- ADDRESS OF THE TCB OF THE REQUESTOR TASK.
1160 ; WD. 03 -- POINTER TO SECOND LUN WORD IN REQUESTOR TASK HEADER.
1161 ; WD. 04 -- CONTENTS OF THE FIRST LUN WORD IN REQUESTOR TASK HEADER (UCB).
1162 ; WD. 05 -- I/O FUNCTION CODE (IO.RLB OR IO.WLB).
1163 ; WD. 06 -- VIRUTAL ADDRESS OF I/O STATUS BLOCK.
1164 ; WD. 07 -- RELOCATION BIAS OF I/O STATUS BLOCK.
1165 ; WD. 10 -- I/O STATUS BLOCK ADDRESS (REAL OR DISPLACEMENT + 140000).
1166 ; WD. 11 -- VIRTUAL ADDRESS OF AST SERVICE ROUTINE.
1167 ; WD. 12 -- RELOCATION BIAS OF I/O BUFFER.
1168 ; WD. 13 -- BUFFER ADDRESS OF I/O TRANSFER.
1169 ; WD. 14 -- NUMBER OF BYTES TO BE TRANSFERED.
1170 ; WD. 15 -- CARRIAGE CONTROL BYTE.
1171 ; WD. 16 -- NOT USED.
1172 ; WD. 17 -- NOT USED.
1173 ; WD. 20 -- NOT USED.
1174 ;
1175
1176
1177 .IF DF D$$M11&D$$H11!D$$ZMD
1178
1179 MOV #IE.DNR&377,R0 ;ASSUME TERMINAL DISABLED
1180 BITB #US.DSB,U.STS(R5) ;UNIT DISABLED?
1181 BNE 5$ ;IF NE YES
1182
1183 .ENDC
1184
1185 000140 010503 MOV R5,R3 ;CALCULATE ADDRESS OF STATUS WORD
1186 000142 062703 000002G ADD #U.CNT+2+STATS,R3 ;
1187 000146 122761 000000C 000001G CMPB #IO.WLB/400,I.FCN+1(R1) ;WRITE LOGICAL BLOCK FUNCTION?
1188
1189 .IF DF T$$MIN
1190
1191 000154 001443 BEQ 30$ ;IF EQ YES
1192
1193 .IFF
1194
1195 BEQ 8$ ;IF EQ YES
1196
1197 .ENDC
1198
1199 000156 042713 000040 BIC #CTLO,(R3) ;ENABLE OUTPUT
1200 000162 012700 000000C MOV #IS.SUC&377,R0 ;ASSUME A HAPPY ENDING
1201
1202 .IF DF T$$CCA&A$$TRP&T$$ESC
1203
1204 CMPB #IO.ATT/400,I.FCN+1(R1) ;ATTACH FUNCTION?
1205 BNE 300$ ;IF NE NO
1206 BITB #TF.ESQ,I.FCN(R1) ;WANT ESCAPE SEQUENCE SUBFUNCTION?
1207 BEQ 3000$ ;IF EQ NO
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-11
TERMINAL INITIATOR
1208 BIS #WESC,ATERS(R3) ;SHOW WANT ESCAPE SEQUENCES
1209 3000$: BITB #TF.AST,I.FCN(R1) ;WANT UNSOLICITED CHAR AST'S?
1210 BNE 1900$ ;IF NE YES
1211
1212 .IFF
1213
1214 .IF DF T$$CCA&A$$TRP
1215
1216 000166 022761 000000C 000000G CMP #IO.ATT!TF.AST,I.FCN(R1) ;UNSOLICITED INPUT AST ATTACH?
1217 000174 001717 BEQ 1900$ ;IF EQ YES
1218
1219 .ENDC
1220
1221 .IF DF T$$ESC
1222
1223 CMP #IO.ATT!TF.ESQ,I.FCN(R1) ;ATTACH WITH ESCAPE SEQUENCES?
1224 BNE 300$ ;IF NE NO
1225 BIS #WESC,ATERS(R3) ;REMEMBER THAT THEY ARE WANTED
1226
1227 .ENDC
1228
1229 .ENDC ; DF T$$CCA&A$$TRP&T$$ESC
1230
1231 000176 300$: ;REF LABEL
1232
1233 .IF DF T$$RPR
1234
1235 CMPB #IO.RPR/400,I.FCN+1(R1) ;READ AFTER PROMPT?
1236 BEQ 1920$ ;IF EQ YES
1237
1238 .ENDC
1239
1240 .IF DF T$$GMC!T$$GTS!T$$SMC
1241
1242 CMPB #IO.GTS/400,I.FCN+1(R1) ;SET/GET CHARACTERISTICS?
1243 BEQ 1889$ ;IF EQ YES
1244
1245 .ENDC
1246
1247 .IF DF T$$CCA&A$$TRP!T$$ESC
1248
1249 000176 122761 000000C 000001G CMPB #IO.DET/400,I.FCN+1(R1) ;DETACH?
1250 000204 001004 BNE 302$ ;IF NE NO
1251 000206 042763 000050 000024 BIC #CCON!WESC,ATERS(R3) ;SHOW NO CONTROL C AST ACTION
1252 ; AND NO DESIRE FOR ESCAPE SEQUENCES
1253 000214 000411 BR 5$ ;LEAVE SUCCESSFUL
1254 000216 302$: ;REF LABEL
1255
1256 .ENDC
1257
1258 000216 122761 000000C 000001G CMPB #IO.RLB/400,I.FCN+1(R1) ;READ LOGICAL BLOCK FUNCTION?
1259 000224 001005 304$: BNE 5$ ;IF NE NO
1260 000226 305$: ;REF LABEL
1261
1262 .IF DF T$$TRW
1263
1264 BITB #TF.RAL,I.FCN(R1) ;READ ALL?
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-12
TERMINAL INITIATOR
1265 BEQ 306$ ;IF EQ NO
1266 BISB #SS.RAL,S.STS(R4) ;REMEMBER READING ALL
1267 306$: ;REF LABEL
1268
1269 .ENDC
1270
1271 .IF DF T$$RST
1272
1273 BITB #TF.RST,I.FCN(R1) ;READ WITH SPECIAL TERMINATORS?
1274 BEQ 4$ ;IF EQ NO
1275 BISB #SS.RST,S.STS(R4) ;SET SPECIAL TERMINATOR FLAG
1276 4$: ;REF LABEL
1277
1278 .ENDC
1279
1280 .IF DF T$$RNE
1281
1282 BIT #U2.NEC,U.CW2(R5) ;TERMINAL IN NO ECHO MODE?
1283 BNE 400$ ;IF NE YES
1284 BITB #TF.RNE,I.FCN(R1) ;THIS READ WITH NO ECHO?
1285 BEQ 401$ ;IF EQ NO
1286 400$: BISB #SS.RNE,S.STS(R4) ;REMEMBER READING WITH NO ECHO
1287 401$: ;REF LABEL
1288
1289 .ENDC
1290
1291 .IF DF T$$UTB
1292
1293 .IF DF C$$CKP&T$$BUF
1294
1295 MOV I.TCB(R1),R2 ;GET ADDRESS OF REQUESTER TCB
1296 BIT #T2.CHK!T2.CKD!T2.DST!T2.AST,T.ST2(R2) ;TASK
1297 ; CHECKPOINTABLE?
1298 BEQ 403$ ;IF EQ YES
1299 BIS #NCKP,ATERS(R3) ;REMEMBER AS NONCHECKPOINTABLE
1300
1301 .ENDC
1302
1303 MOV U.BUF+2(R5),R0 ;MAKE INPINI SET UCB TO POINT
1304 CALL INPINI ; AT TASK'S BUFFER
1305 BR 10$ ;
1306
1307 .ENDC ; DF T$$UTB
1308
1309 ;
1310 ; REQUEST IS A SOLICITED INPUT REQUEST-GET A BUFFER FOR INPUT
1311 ;
1312
1313 000226 403$: ;REF LABEL
1314
1315 .IF NDF T$$UTB!NOEXBF
1316
1317 .IF DF T$$VBF
1318
1319 MOV U.CNT(R5),R1 ;GET HOW MUCH HE WANTS ALLOCATED
1320 ADD #M$$CRB-M$$CRI,R1 ;EXEC BUFFER IS A BIT LONGER
1321 CALL GETBF2 ;ALLOCATE EXEC BUFFER
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-13
TERMINAL INITIATOR
1322
1323 .IFF
1324
1325 000226 CALL GETBF ;GET BUFFER FOR INPUT
1326
1327 .ENDC
1328
1329 000232 103006 BCC 10$ ;IF CC BUFFER ALLOCATED
1330 000234 012700 000000C MOV #IE.NOD&377,R0 ;SET NO BUFFER AVAILABLE STATUS
1331
1332 .IF DF T$$UTB!T$$RPR
1333
1334 BIC #NCKP!RPRM!XOFF,ATERS(R3) ;CLEAR POSSIBLY SET BITS
1335
1336 .ENDC
1337
1338 .ENDC ; NDF T$$UTB!NOEXBF
1339
1340 000240 5$: CALL $IOALT ;FINISH I/O OPERATION
1341 000244 000721 BTTINI: BR TTINI ;TRY AGAIN
1342
1343 .IF NDF T$$MIN
1344
1345 8$: BR 30$ ;STRETCH THE BRANCH A BIT
1346 9$: BR 28$ ; AND SAVE A WORD
1347
1348 .ENDC
1349
1350 000246 900$: RETURN ;
1351
1352 000250 052713 000100 10$: BIS #SOLI,(R3) ;SET SOLICITED INPUT FLAG
1353
1354 .IF DF T$$RPR
1355
1356 .IIF NE RPRM-100000, .ERROR RPRM
1357
1358 TST ATERS(R3) ;READ AFTER PROMPT?
1359
1360 .IF DF D$$YNM&M$$MGE
1361
1362 BMI 29$ ;IF MI YES
1363
1364 .IFF
1365
1366 BMI 70$ ;IF MI YES
1367
1368 .ENDC
1369
1370 .ENDC
1371
1372 000254 032713 001000 BIT #CRJT,(R3) ;CARRIAGE RETURN JUST TYPED?
1373
1374
1375 .IF DF C$$CKP&T$$BUF
1376
1377 ;
1378 ; TRY TO CHECKPOINT THE TASK WHILE IT IS WAITING FOR INPUT
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-14
TERMINAL INITIATOR
1379 ;
1380
1381 CALL 27$ ;OUTPUT LF OR CLEAR ECHO-IN-PROGRESS
1382 MOV U.SCB(R5),R4 ;RETRIEVE ADDRESS OF SCB
1383 SHOVE: MOV S.PKT(R4),R5 ;GET ADDRESS OF I/O PACKET
1384 MOV I.TCB(R5),R0 ;GET ADDRESS OF REQUESTER TCB
1385 BIT #T2.CHK!T2.CKD!T2.DST!T2.AST,T.ST2(R0) ;STOP TASK?
1386 BNE 900$ ;IF NE NO
1387 ; EB041
1388 .IF DF D$$YNM&M$$MGE ; EB041
1389 .IFF ; EB041
1390 ; EB041
1391 BIS #T2.TIO,T.ST2(R0) ;SHOW DOING TERMINAL I/O
1392 DECB T.IOC(R0) ;ADJUST OUTSTANDING I/O REQUEST COUNT
1393
1394 .IFT ; EB041
1395
1396 ADD #I.PRM,R5 ;POINT TO FIRST PARAMETER WORD
1397 MOV T.PCB(R0),R1 ;GET ADDRESS OF REQUESTER HEADER
1398 MOV P.HDR(R1),R1 ;
1399 MOV H.WND(R1),R1 ;POINT TO NUMBER OF WINDOW BLOCKS
1400 MOV (R1)+,R2 ;GET COUNT OF WINDOWS ; EB041
1401 23$: DEC R2 ;ANY MORE WINDOWS TO EXAMINE? ; EB041
1402 BLT 900$ ;IF LT NO -- DO NOT CHECKPOINT ; EB041
1403 MOV (R1)+,R4 ;GET ADDRESS OF DESCRIPTOR PCB ; EB041
1404 MOV (R1)+,-(SP) ;GET LOW VIRTUAL ADDRESS ; EB041
1405 MOV (R1)+,R3 ;GET HIGH VIRTUAL ADDRESS
1406 SUB (SP),R3 ;CALCULATE NUMBER OF BYTES MINUS 1 ; EB041
1407 INC R3 ;INCREMENT TO ACTUAL NUMBER OF BYTES
1408 SWAB R3 ;CONVERT TO 32W BLOCKS
1409 ASL R3 ;
1410 ADC R3 ;
1411 ASL R3 ;
1412 ADC R3 ;
1413 MOV P.REL(R4),(SP) ;GET RELOCATION BIAS OF PCB ; EB041
1414 ; EB041
1415 .IF DF P$$LAS ; EB041
1416 ; EB041
1417 ADD W.BOFF-W.BATT(R1),(SP) ;ADD IN OFFSET IN PARTITION ; EB041
1418 ; EB041
1419 .ENDC ; EB041
1420 ; EB041
1421 ADD (SP),R3 ;CALCULATE HIGHEST 32W BLOCK ; EB041
1422 ADD #W.BLGH-W.BATT,R1 ;POINT TO NEXT DESCRIPTOR
1423 CMP (R5),(SP)+ ;TRANSFER IN THIS PARTITION? ; EB041
1424 BLO 23$ ;IF LO NO
1425 CMP (R5),R3 ;TRANSFER IN THIS PARTITION?
1426 BHIS 23$ ;IF HIS NO
1427 BIS #T2.TIO,T.ST2(R0) ;SHOW DOING TERMINAL I/O ; EB041
1428 DECB T.IOC(R0) ;ADJUST OUTSTANDING I/O REQUEST COUNT ; EB041
1429 SUB P.REL(R4),(R5) ;CONVERT TO RELATIVE RELOCATION BIAS ; EB041
1430 MOV R4,I.PRM+16-I.PRM(R5) ;SAVE ADDRESS OF DESCRIPTOR PCB ; EB041
1431
1432 .ENDC
1433
1434 BIT #TS.CKR,T.STAT(R0) ;CHECKPOINT ALREADY REQUESTED?
1435 BEQ 24$ ;IF EQ NO
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-15
TERMINAL INITIATOR
1436 BIC #TS.CKR,T.STAT(R0) ;CLEAR CHECKPOINT REQUEST
1437 24$: CALLR $STPTK ;CLEAR TS.STP, CALL $SETCR, $CHKPT
1438 ; AND $NXTSK
1439
1440 .ENDC ; DF C$$CKP&T$$BUF
1441
1442 000260 001042 27$: BNE 55$ ;IF NE OUTPUT LINE FEED AND RETURN
1443 000262 28$: ;REF LABEL
1444
1445 .IF DF T$$MIN
1446
1447 .IF DF T$$BTW
1448
1449 CALLR INPT0 ;CLEAR ECHO IN PROGRESS AND RETURN
1450
1451 .IFF
1452
1453 000262 000561 BR INPT0 ;CLEAR ECHO IN PROGRESS AND RETURN
1454
1455 .ENDC
1456
1457 .IFF
1458
1459 CALLR INPT0 ;CLEAR ECHO IN PROGRESS AND RETURN
1460
1461 .ENDC ; DF T$$MIN
1462
1463 .IF DF D$$YNM&M$$MGE&T$$RPR
1464
1465 29$: BR 70$ ;
1466
1467 .ENDC
1468
1469 ;
1470 ; REQUEST IS AN OUTPUT REQUEST-SET UP CARRIAGE CONTROL FLAGS
1471 ;
1472
1473 000264 042713 076537 30$: BIC #LFCT!CRTY!EOLS!RUBP!SOLI!FLCT,(R3) ;CLEAR STATUS WORD
1474 000270 052713 100000 BIS #MODE,(R3) ;SET OUTPUT MODE
1475
1476 .IF DF T$$BTW
1477
1478 BIC #BTWQ,ATERS(R3) ;IF NECESSARY, CLEAR IO.WBT QUEUED FLAG
1479 BITB #TF.WBT,I.FCN(R1) ;IS THIS A BREAKTHROUGH WRITE?
1480 BNE FWRITE ;IF NE YES (LEAVE US.ECH SET TO
1481 ; DISALLOW CONTROL O DURING THE WRITE)
1482
1483 .ENDC
1484
1485 000274 CALL INPT0 ;ALLOW INPUT INTERRUPTS
1486 000300 FWRITE: ;REF LABEL
1487
1488 .IF DF T$$CCO!T$$BTW
1489
1490 BITB #TF.CCO,I.FCN(R1) ;TASK WANTS TO CLEAR CONTROL O FLAG?
1491 BNE 33$ ;IF NE YES
1492
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-16
TERMINAL INITIATOR
1493 .ENDC
1494
1495 000300 005765 000000G TST U.ATT(R5) ;TERMINAL ATTACHED?
1496 000304 001002 BNE 34$ ;IF NE YES
1497 000306 042713 000040 33$: BIC #CTLO,(R3) ;STOP SUPPRESSING OUTPUT
1498 000312 34$: ;REF LABEL
1499
1500 .IF DF T$$TRW
1501
1502 BITB #TF.WAL,I.FCN(R1) ;WRITE ALL?
1503 BEQ 36$ ;IF EQ NO
1504 ; EB036
1505 .IFF ; EB036
1506 ; EB036
1507 000312 000400 BR 36$ ;PROCESS CARRIAGE CONTROL ; EB036
1508
1509 .ENDC
1510
1511 .IF DF T$$RPR!T$$TRW
1512
1513 35$: BISB #SS.WAL,S.STS(R4) ;REMEMBER WRITING ALL
1514 BIC #CRJT,(R3) ;CLEAR CR JUST TYPED INDICATOR
1515 CLRB HORPS(R3) ;CLEAR HORIZANTAL POSITION INDICATOR
1516 BR 60$ ;SKIP CARRIAGE CONTROL BYTE PROCESSING
1517
1518 .ENDC
1519
1520 000314 116100 000006G 36$: MOVB I.PRM+6(R1),R0 ;GET CARRIAGE CONTROL BYTE
1521 000320 001424 37$: BEQ 60$ ;IF EQ NO CARRIAGE CONTROL
1522 000322 122700 000044 CMPB #'$,R0 ;CARRIAGE RETURN AT END OF LINE?
1523 000326 001402 BEQ 40$ ;IF EQ NO
1524 000330 052713 002000 BIS #CRTY,(R3) ;SET FOR CARRIAGE RETURN AT END
1525 000334 122700 000053 40$: CMPB #'+,R0 ;LINE FEED AT START OF LINE?
1526 000340 001414 BEQ 60$ ;IF EQ NO
1527 000342 122700 000061 CMPB #'1,R0 ;FORM FEED AT BEGINNING OF LINE?
1528 000346 001002 BNE 50$ ;IF NE NO
1529
1530 .IF DF T$$18S
1531
1532 BIT #U2.L8S,U.CW2(R5) ;OUTPUTTING TO A LA180S?
1533 BEQ 48$ ;IF EQ NO
1534
1535 .IIF NE FLBT-1, .ERROR FLBT
1536
1537 INC (R3) ;WANT ONE FILL CHARACTER
1538 MOVB #14,FLBYT(R3) ;IT IS TO BE A FORM FEED
1539 BR 60$ ;
1540
1541 .ENDC
1542
1543 000350 062713 034000 48$: ADD #LFBT*7,(R3) ;ADD IN SEVEN LINE FEEDS
1544 000354 062713 004000 50$: ADD #LFBT,(R3) ;ADD IN ONE LINE FEED
1545 000360 122700 000060 CMPB #'0,R0 ;DOUBLE SPACE?
1546 000364 001002 BNE 60$ ;IF NE NO
1547 000366 062713 004000 55$: ADD #LFBT,(R3) ;ADD IN ONE LINE FEED
1548 000372 60$: MTPS S.PRI(R4) ;;;LOCK OUT DEVICE INTERRUPTS
1549 000400 CALLR OUTPT1 ;;;START OUTPUT
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-17
TERMINAL INITIATOR
1550
1551 .IF DF T$$RPR
1552
1553 ;
1554 ; IF NECESSARY, COPY THE PROMPT TO AN EXECUTIVE BUFFER SO THE
1555 ; TASK CAN BE CHECKPOINTED FOR BOTH THE PROMPT WRITE AND THE
1556 ; FOLLOWING READ.
1557 ;
1558
1559 70$: BIC #CTLO,(R3) ;CLEAR CONTROL O FLAG
1560 MOV S.PKT(R4),R1 ;FIND START OF I/O PACKET
1561 ADD #I.PRM+4,R1 ;POINT AT READ BUFFER LENGTH
1562 CMP (R1),U.CNT(R5) ;READ LARGER THAN OUR BUFFER?
1563 BHIS 72$ ;IS HIS UCB PROPERLY SETUP FOR READ ; EB016
1564 MOV (R1),U.CNT(R5) ;RESTORE COUNT OF CHARS TO BE READ ; EB016
1565 MOVB (R1),RMBYT(R3) ;CORRECT COUNT OF BYTES LEFT IN READ BUF ; EB016
1566 72$: CMP (R1)+,(R1)+ ;POINT AT 1ST WORD OF ADDR DOUBLE WORD
1567
1568 .IF DF C$$CKP&T$$BUF
1569
1570 MOV I.PRM+16-I.PRM-10(R1),-(SP) ;SAVE PROMPT VFC ; EB055
1571 ; EB055
1572 .IFF ; EB055
1573 ; EB055
1574 MOV I.PRM+16-I.PRM-10(R1),R0 ;PUT PROMPT WHERE IT'S EXPECTED ; EB055
1575 ; EB055
1576 .IFTF ; EB055
1577 ; EB030
1578 .IF DF R$$LKL ; EB030
1579 ; EB030
1580 CLR I.PRM+16-I.PRM-10(R1) ;MAKE LOCKING WORD ZERO AGAIN ; EB055
1581 ; EB030
1582 .ENDC ; EB030
1583 ; EB030
1584 .IFT ; EB055
1585 ; EB055
1586 MOV I.TCB-I.PRM-10(R1),R2 ;GET TCB ADDRESS ; EB055
1587 BIT #T2.CHK!T2.CKD!T2.DST!T2.AST,T.ST2(R2) ;TASK
1588 ; CHECKPOINTABLE?
1589 BNE 78$ ;IF NE NO
1590 ; EB055
1591 .IF DF M$$MGE ; EB055
1592 ; EB055
1593 MOV (R1)+,@#KISAR6 ;MAP TO PROMPT (WRITE) BUFFER ; EB055
1594 ; EB055
1595 .IFF ; EB055
1596 ; EB055
1597 TST (R1)+ ;POINT AT PROMPT BUFFER ADDRESS ; EB055
1598 ; EB055
1599 .ENDC ; EB055
1600 ; EB055
1601 MOV STRBF(R3),R2 ;POINT AT EXEC READ BUFFER
1602 MOV (R1),R0 ;POINT AT PROMPT BUFFER
1603 MOV R2,(R1)+ ;PUT EXEC BUFFER ADDRESS IN I/O PACKET
1604 MOV (R1),-(SP) ;SAVE LENGTH OF PROMPT
1605 75$: MOVB (R0)+,(R2)+ ;COPY PROMPT TO EXEC BUFFER
1606 DEC (SP) ;DONE?
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 4-18
TERMINAL INITIATOR
1607 BGT 75$ ;IF GT NO
1608 MOV R3,(SP) ;SAVE R3
1609 MOV R5,-(SP) ;SAVE R5
1610 CALL SHOVE ;SET UP THE CHECKPOINT
1611 MOV (SP)+,R5 ;RESTORE R5
1612 MOV U.SCB(R5),R4 ;RESTORE R4
1613 MOV (SP)+,R3 ;RESTORE R3
1614 78$: MOV (SP)+,R0 ;RETRIEVE PROMPT VFC ; EB055
1615
1616 .ENDC ; DF C$$CKP&T$$BUF
1617
1618 MOV S.PKT(R4),R1 ;POINT AT I/O PACKET
1619 BITB #TF.BIN,I.FCN(R1) ;WRITE ALL PROMPT?
1620 BNE 35$ ;IF NE YES
1621 MOV R0,R0 ;SET CONDITION BITS
1622 BR 37$ ;INTERPRET PROMPT VFC
1623
1624 .ENDC ; DF T$$RPR
1625
1626 .DSABL LSB
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 5
OUTPUT-NEXT-BYTE ROUTINE
1628 .SBTTL OUTPUT-NEXT-BYTE ROUTINE
1629
1630 .ENABL LSB
1631
1632 .IF DF T$$RPR
1633
1634 ;
1635 ; WRITE OUT THE PROMPT OF AN IO.RPR
1636 ;
1637
1638 57$: MOV S.PKT(R4),R4 ;;;FIND START OF I/O PACKET ; EB090
1639 BIT #CTLO,(R3) ;;;CONTROL/O IN MIDDLE OF PROMPT? ; EB090
1640 BNE 5704$ ;;;IF NE YES
1641 DEC I.PRM+14(R4) ;;;DONE PROMPTING?
1642 BMI 5702$ ;;;IF MI YES
1643
1644 .IF DF M$$MGE
1645
1646 MOV @#KISAR6,-(SP) ;;;SAVE EXECUTIVE MAPPING
1647 MOV I.PRM+10(R4),@#KISAR6 ;;;MAP TO PROMPT BUFFER
1648 MOVB @I.PRM+12(R4),-(SP) ;;;GET NEXT BYTE OF PROMPT
1649
1650 .IFF
1651
1652 MOVB @I.PRM+12(R4),-(SP) ;;;GET NEXT BYTE OF PROMPT
1653
1654 .IFTF
1655
1656 INC I.PRM+12(R4) ;;;POINT AT ITS SUCCESSOR
1657
1658 .IFT
1659
1660 MOV 2(SP),@#KISAR6 ;;;RESTORE EXECUTIVE MAPPING
1661 MOV (SP)+,(SP) ;;;LEAVE PROMPT BYTE ON STACK
1662
1663 .ENDC ;;; DF M$$MGE
1664
1665 MOV U.SCB(R5),R4 ;;;RESTORE R4
1666 CALL INPT0 ;;;ALLOW CONTROL Q, S, AND O INPUT
1667 ;;; (REDUNDANT AFTER FIRST CLEARING)
1668 BR 5703$ ;;;TRANSMIT THE PROMPT CHARACTER
1669 5702$: BIT #CRTY,(R3) ;;;CARRIAGE RETURN AFTER PROMPT? ; EB019
1670 BEQ 5704$ ;;;IF EQ NO
1671 MOV U.SCB(R5),R4 ;;;RESTORE POINTER TO SCB ; EB019
1672 MOV #15,-(SP) ;;;TRANSMIT A CARRIAGE RETURN
1673 BIC #CRTY,(R3) ;;;CLEAR WANT CARRIAGE RETURN FLAG
1674
1675 .IF DF T$$BTW&T$$30P
1676
1677 5703$: JMP ECHOB ;;;
1678
1679 .IFF
1680
1681 5703$: BR BECHOB ;;;
1682
1683 .ENDC
1684
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 5-1
OUTPUT-NEXT-BYTE ROUTINE
1685 5704$: BIC #RPRM,ATERS(R3) ;;;CLEAR PROMPTING FLAG
1686 MOVB #IO.RLB/400,I.FCN+1(R4) ;;;CONVERT IO.RPR TO IO.RLB ; EB019
1687 MOV U.SCB(R5),R4 ;;;RESTORE POINTER TO SCB ; EB019
1688 RETURN ;;;
1689
1690 .IF DF T$$BTW
1691
1692 5705$: BR 57$ ;;;
1693
1694 .ENDC
1695
1696 .ENDC ;;; DF T$$RPR
1697
1698 .IF DF T$$30P
1699
1700 ;
1701 ; TRANSMITTER NOT BUSY ECHOING, SO PROCESS CHARACTER THAT WAS
1702 ; RECEIVED (AND BUFFERED IN SOFTWARE), BUT NOT ECHOED.
1703 ;
1704
1705 5708$: BIC #CHAR,ATERS(R3) ;;;CLEAR FLAG
1706 CLR -(SP) ;;;CLEAR UPPER BYTE OF STACK
1707 MOVB MBUFR(R3),(SP) ;;;RETRIEVE INPUT CHARACTER
1708 JMP RESUME ;;;PROCESS THE CHARACTER
1709
1710 .ENDC
1711
1712 .IF DF T$$BTW
1713
1714 ;
1715 ; RESTORE THE SCB AND UCB ENVIRONMENT FOR AN UNSOLICITED READ
1716 ; DISPLACED BY AN IO.WBT
1717 ;
1718
1719 5710$: MOVB #1,S.STS(R4) ;LINE WAS ONLY BUSY
1720 CLR (R3)+ ;CLEAR U.BUF (BUFFER IS IN EXEC SPACE)
1721 MOV U.CNT+2+CURBF(R5),(R3)+ ;RESTORE U.BUF+2 ; EB054
1722
1723 ; NEXT INSTRUCTION DEPENDS ON STRBF=U.CNT+4
1724
1725 CMP (R3)+,(R3)+ ;POINT AT STRBF
1726 MOV (R3),-(SP) ;FORM POINTER TO SAVED STATS
1727 SUB #1*2,(SP) ;
1728 MOV @(SP)+,-(R3) ;RESTORE STATS
1729 BR 5800$ ;FINISH WITH A FLOURISH
1730
1731 ;
1732 ; RESTORE THE SCB AND UCB ENVIRONMENT OF THE READ DISPLACED
1733 ; BY AN IO.WBT
1734 ;
1735
1736 58$: MOV U.SCB(R5),R4 ;RESTORE R4
1737 BISB #US.BSY,U.STS(R5) ;REBUSY LINE
1738 BIC #BTWP,U.CNT+2+ATERS(R5) ;CLEAR BREAKTHROUGH FLAG
1739 MOV R5,R3 ;POINT AT U.BUF
1740 ADD #U.BUF,R3 ;
1741 MOV U.CNT+2+STATS(R5),R1 ;RETRIEVE READ'S I/O PACKET POINTER
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 5-2
OUTPUT-NEXT-BYTE ROUTINE
1742 BEQ 5710$ ;IF EQ BROKE THROUGH UNSOLICITED READ
1743 MOVB (R1),S.STS(R4) ;RESTORE SCB STATUS
1744 MOV R1,S.PKT(R4) ;MAKE THE READ THE CURRENT OPERATION
1745 ADD #I.PRM+6,R1 ;POINT AT THE READ'S SAVED UCB INFO
1746 MOV (R1)+,(R3)+ ;RESTORE U.BUF
1747 MOV (R1)+,(R3)+ ;RESTORE U.BUF+2
1748 MOV (R1)+,(R3)+ ;RESTORE U.CNT
1749
1750 ; NEXT INSTRUCTION DEPENDS ON STATS=U.CNT+2
1751
1752 MOV (R1)+,(R3) ;RETRIEVE TERMINAL STATUS
1753 CMPB #IE.ABO,FNBYT(R3) ;CANCEL THE DISPLACED READ?
1754 BNE 5800$ ;IF NE NO
1755 JMP INPT2 ;TERMINATE READ
1756 5800$: MTPS S.PRI(R4) ;RAISE PRIORITY FOR FAKE CONTROL R
1757 CLR -(SP) ;;;FAKE A CONTROL R
1758 JMP CTRLR ;;;
1759
1760 .ENDC
1761
1762 ;
1763 ; OUTPT - START OR CONTINUE AN OUTPUT STREAM
1764 ;
1765 ; AT ENTRY:
1766 ; R5 -> UCB
1767 ; R4 -> SCB
1768 ; R3 -> TCB (UCB + #U.CNT+2)
1769 ; INTERRUPT PRIORITY = THAT OF OUTPUT DEVICE
1770 ;
1771 ; EXITS VIA RETURN AFTER OUTPUTTING ANOTHER CHARACTER OR THROUGH
1772 ; $FORK AT 20$ THERE ARE NO MORE CHARACTERS TO OUTPUT OR THROUGH
1773 ; $FORK AT INPT1 IF THE INPUT LINE IS COMPLETE (THE OUTPUT
1774 ; INTERRUPT IS FROM A CHARACTER ECHO).
1775 ;
1776
1777 000404 OUTPT: ;;;REF LABEL
1778
1779 .IF DF T$$30P
1780
1781 BIC #ECHO,ATERS(R3) ;;;CLEAR ECHOING BIT
1782
1783 .ENDC
1784
1785 .IF DF T$$HLD
1786
1787 BIT #BAKS,ATERS(R3) ;;;CLEARING HOLD-SCREEN MODE?
1788 BEQ 2$ ;;;IF EQ NO
1789 XITHSM: MOVB @MEBUF(R3),-(SP) ;;;GET NEXT BYTE OF "ESC \"
1790 BNE 5300$ ;;;IF NE HAVE ANOTHER BYTE TO SEND
1791 BIC #BAKS,ATERS(R3) ;;;CLEAR FLAG
1792 TST (SP)+ ;;;THROW AWAY TERMINATING BYTE
1793 2$: ;;;REF LABEL
1794
1795 .ENDC
1796
1797 .IF DF T$$SYN!T$$HLD
1798
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 5-3
OUTPUT-NEXT-BYTE ROUTINE
1799 BIT #CCPN,ATERS(R3) ;;;CONTROL C PENDING?
1800 BEQ 2002$ ;;;IF EQ NO
1801 BIC #CCPN,ATERS(R3) ;;;CLEAR FLAG
1802 TSTB S.STS(R4) ;;;IS CONTROL C GOING TO BE PROCESSED
1803 ;;; IMMEDIATELY?
1804 BEQ 2000$ ;;;IF EQ YES
1805
1806 .IIF NE MODE-100000, .ERROR MODE
1807
1808 TST (R3) ;;;BUSY ON INPUT?
1809 BPL 2000$ ;;;IF PL YES
1810 MOV #2002$,-(SP) ;;;SETUP SO NEXT RETURN IS TO 2002$,
1811 ;;; WHICH PROPAGATES THE RENEWED OUTPUT
1812 2000$: MOV #3,-(SP) ;;;FAKE A RECEIVED CONTROL C
1813 JMP DOCTLC ;;;EVALUATE IT
1814 2002$: ;;;REF LABEL
1815
1816 .ENDC
1817
1818 .IF DF T$$30P
1819
1820 BIT #CHAR,ATERS(R3) ;;;HAVE AN INPUT CHAR TO PROCESS?
1821 BNE 5708$ ;;;IF NE YES
1822
1823 .ENDC
1824
1825 000404 032713 000017 OUTPT1: BIT #FLCT,(R3) ;;;SHOULD A FILL BE ECHOED?
1826 000410 001112 BNE 60$ ;;;IF NE YES
1827 000412 032713 074000 BIT #LFCT,(R3) ;;;ANY UNPROCESSED LINE FEEDS?
1828 000416 001034 BNE 40$ ;;;IF NE YES
1829 000420 117346 000012 MOVB @MEBUF(R3),-(SP);;;MULTI-ECHO SEQUENCE IN PROGRESS?
1830 000424 001036 BNE 50$ ;;;IF NE YES
1831 000426 005726 3$: TST (SP)+ ;;;NO - REMOVE ZERO CHAR FROM STACK
1832
1833 .IF DF T$$BTW!T$$CTR ; EB054
1834
1835 MOV #CTRLU-1,MEBUF(R3) ;;;POINT AT ZERO THAT WON'T DISAPPEAR
1836
1837 .ENDC
1838
1839 .IF DF T$$RPR
1840
1841 .IIF NE RPRM-100000, .ERROR RPRM
1842
1843 TST ATERS(R3) ;;;WRITING A PROMPT?
1844
1845 .IF DF T$$BTW
1846
1847 BMI 5705$ ;;;IF MI YES
1848
1849 .IFF
1850
1851 BMI 57$ ;;;IF MI YES
1852
1853 .ENDC
1854
1855 .ENDC ;;; DF T$$RPR
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 5-4
OUTPUT-NEXT-BYTE ROUTINE
1856
1857 .IIF NE MODE-100000, .ERROR MODE
1858
1859 000430 005713 TST (R3) ;;;INPUT OR OUTPUT IN PROGRESS?
1860 000432 100072 BPL INPPT ;;;IF PL INPUT
1861
1862 ;
1863 ; OUTPUT REQUEST IN PROGRESS
1864 ;
1865
1866 000434 032713 000440 BIT #EOLS!CTLO,(R3) ;;;END OF LINE SEEN OR OUTPUT DISABLED?
1867 000440 001016 BNE 20$ ;;;IF NE YES
1868 000442 005365 000000G DEC U.CNT(R5) ;;;DECREMENT BYTE COUNT
1869 000446 100403 BMI 10$ ;;;IF MI CHECK CARRIAGE CONTROL
1870 000450 CALL $GTBYT ;;;GET NEXT BYTE FROM USER BUFFER
1871 000454 000473 BECHOB: BR ECHOB ;;;ECHO NEXT BYTE
1872
1873 .IF DF T$$BTW
1874
1875 9$: BR 58$ ;
1876
1877 .ENDC
1878
1879 000456 112746 000015 10$: MOVB #15,-(SP) ;;;ASSUME TRAILING CARRIAGE RETURN REQUIRED
1880 000462 052713 000400 BIS #EOLS,(R3) ;;;SET END OF LINE SEEN
1881 000466 032713 002000 BIT #CRTY,(R3) ;;;OUTPUT TRAILING CARRIAGE RETURN?
1882 000472 001064 BNE ECHOB ;;;IF NE YES
1883 000474 005726 TST (SP)+ ;;;CLEAN STACK
1884
1885 ;
1886 ; FINISHED AN OUTPUT REQUEST. WANT TO RETURN STATUS.
1887 ;
1888
1889 000476 20$: CALL $FORK ;;;CREATE A SYSTEM PROCESS AND RETURN
1890 000502 012700 000000C MOV #IS.SUC&377,R0 ;SET SUCCESSFUL COMPLETION STATUS
1891 000506 000421 BR 55$ ;SEE IF ERROR OR SUCCESS
1892
1893 ;
1894 ; ECHO LINE FEED
1895 ;
1896
1897 000510 162713 004000 40$: SUB #LFBT,(R3) ;;;REDUCE LINE FEED COUNT
1898 000514 112746 000012 MOVB #12,-(SP) ;;;SET TO ECHO LINE FEED
1899 000520 000451 BR ECHOB ;;;ECHO BYTE
1900
1901 ;
1902 ; MULTI-ECHO SEQUENCE
1903 ;
1904
1905 000522 50$: ;;;REF LABEL
1906
1907 .IF DF T$$BTW!T$$CTR&T$$UTB&M$$MGE ; EB054
1908
1909 BIT #MCTR,ATERS(R3) ;;;CONTROL/R INPUT IN TASK'S BUFFER?
1910 BEQ 53$ ;;;IF EQ NO
1911
1912 ;
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 5-5
OUTPUT-NEXT-BYTE ROUTINE
1913 ; DOING CONTROL R FOR A TASK THAT HAS THE INPUT STRING IN ITS ; EB054
1914 ; ADDRESS SPACE. TRY HARDER.
1915 ;
1916
1917 CALL $GTBYT ;;;PUT NEXT BYTE ON STACK
1918 MOVB (SP)+,(SP) ;;;COLLAPSE STACK
1919 BNE ECHOB ;;;IF NE SOMETHING TO TRANSMIT
1920 DEC U.BUF+2(R5) ;;;POINT AT POSITION TO STORE NEXT
1921 ;;; INPUT CHARACTER
1922 BIC #MCTR,ATERS(R3) ;;;CLEAR FLAG
1923 BR 3$ ;;;DO NORMAL COMPLETION
1924 53$: ;;;REF LABEL
1925
1926 .ENDC
1927
1928 000522 005263 000012 5300$: INC MEBUF(R3) ;;;INCREMENT BUFFER ADDRESS
1929 000526 000446 BR ECHOB ;;;ECHO BYTE ON STACK
1930
1931 ;
1932 ; TERMINAL TIMEOUT-FINISH I/O OPERATION
1933 ; ENTERED ON FORK LEVEL WITH TERMINAL CONTROLLER ALREADY RESET
1934 ;
1935
1936 000530 122765 000000G 000007G TTOUT1: CMPB #IE.ABO,U.CNT+2+FNBYT(R5) ;TIMEOUT OR CANCEL?
1937 000536 001402 BEQ 54$ ;IF EQ CANCEL
1938 000540 110065 000007G MOVB R0,U.CNT+2+FNBYT(R5) ;REMEMBER TIMEOUT STATUS
1939 000544 54$: ;REF LABEL
1940
1941 .IF DF T$$BTW!T$$CTR ; EB054
1942
1943 MOV #CTRLU-1,U.CNT+2+MEBUF(R5) ;POINT AT A ZERO BYTE
1944
1945 .IF DF T$$UTB&M$$MGE
1946
1947 BIC #MCTR,U.CNT+2+ATERS(R5) ;CLEAR SPECIAL CONTROL R FLAG
1948
1949 .ENDC
1950
1951 .ENDC
1952
1953 .IIF NE MODE-100000, .ERROR MODE
1954
1955 000544 005765 000002G TST U.CNT+2+STATS(R5) ;INPUT OR OUTPUT IN PROGRESS?
1956
1957 .IF DF T$$MIN
1958
1959 .IF DF T$$BTW
1960
1961 BPL INPT22 ;IF PL INPUT
1962
1963 .IFF
1964
1965 000550 100161 BPL INPT2 ;IF PL INPUT
1966
1967 .ENDC
1968
1969 .IFF
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 5-6
OUTPUT-NEXT-BYTE ROUTINE
1970
1971 BPL INPT22 ;IF PL INPUT
1972
1973 .ENDC
1974
1975 000552 016401 000000G 55$: MOV S.PKT(R4),R1 ;POINT AT COMPLETED OUTPUT I/O PACKET
1976 000556 016101 000004G MOV I.PRM+4(R1),R1 ;GET BYTES IT WANTED TRANSFERED
1977 000562 032765 000040 000002G BIT #CTLO,U.CNT+2+STATS(R5) ;TERMINATION BY CONTROL O
1978 ; OR EOLS?
1979 000570 001010 BNE 56$ ;IF NE CONTROL O
1980 000572 016502 000000G MOV U.CNT(R5),R2 ;SAVE BYTES LEFT TO TRANSFER
1981 000576 100405 BMI 56$ ;IF MI DID THE ENTIRE WRITE
1982 000600 160201 SUB R2,R1 ;CALCULATE BYTES NOT TRANSFERED
1983 000602 016500 000006G MOV U.CNT+2+FNBYT-1(R5),R0 ;GET REASON FOR PARTIAL TRANSFER
1984 000606 105000 CLRB R0 ;CHANGE INTO IOSB
1985 000610 000300 SWAB R0 ;
1986 000612 56$: ;REF LABEL
1987
1988 .IF DF T$$BTW
1989
1990 BIT #BTWP,U.CNT+2+ATERS(R5) ;DID A BREAKTHROUGH WRITE?
1991 BEQ IODON ;IF EQ NO
1992 MOV S.PKT(R4),R2 ;POINT AT I/O PACKET FOR WRITE
1993 MOV I.PRM+16(R2),U.CNT+2+STATS(R5) ;SAVE DISPLACED READ'S
1994 ; I/O PACKET ADDRESS IN THE UCB
1995 ; EB030
1996 .IF DF R$$LKL ; EB030
1997 ; EB030
1998 CLR I.PRM+16(R2) ;MAKE LOCKING WORD ZERO AGAIN ; EB030
1999 ; EB030
2000 .ENDC ; EB030
2001
2002 .IFTF
2003
2004 000612 IODON: CALL $IODON ;FINISH I/O OPERATION
2005
2006 .IFT
2007
2008 BIT #BTWP,U.CNT+2+ATERS(R5) ;DID A BREAKTHROUGH WRITE?
2009 BNE 9$ ;IF NE YES
2010
2011 .ENDC
2012
2013 .IF DF T$$MIN
2014
2015 .IF DF T$$BTW
2016
2017 JMP TTINI ;GO AGAIN
2018
2019 .IFF
2020
2021 000616 000612 BR BTTINI ;GO AGAIN
2022
2023 .ENDC
2024
2025 .IFF
2026
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 5-7
OUTPUT-NEXT-BYTE ROUTINE
2027 JMP TTINI ;GO AGAIN
2028
2029 .ENDC
2030
2031 ;
2032 ; INPUT REQUEST IN PROGRESS
2033 ;
2034
2035 000620 032713 000400 INPPT: BIT #EOLS,(R3) ;;;END OF LINE SEEN?
2036
2037 .IF NDF T$$MIN
2038
2039 BNE INPT11 ;;;IF NE YES
2040
2041 .IFF
2042
2043 000624 001131 BNE INPT1 ;;;IF NE YES
2044
2045 .ENDC
2046
2047 000626 142765 000000G 000000G INPT0: BICB #US.ECH,U.STS(R5) ;;;ENABLE INPUT CHARACTER HANDLING
2048 000634 RETURN ;;;
2049
2050 ;
2051 ; ECHO FILL BYTE
2052 ;
2053
2054 .IIF NE FLBT-1, .ERROR FLBT
2055
2056 000636 005313 60$: DEC (R3) ;;;DECREMENT FILL COUNT
2057 000640 116346 000011 MOVB FLBYT(R3),-(SP) ;;;SET TO ECHO FILL BYTE
2058 ;;;FALL INTO CODE TO ECHO BYTE
2059
2060 .DSABL LSB
2061
2062 ;
2063 ; ECHO NEXT BYTE
2064 ;
2065
2066 .ENABL LSB
2067
2068 000644 ECHOB: ;;;REF LABEL
2069
2070 .IF DF T$$TRW
2071
2072 BITB #SS.WAL,S.STS(R4) ;;;WRITE PASS ALL?
2073 BNE ECHOB1 ;;;IF NE YES
2074
2075 .ENDC
2076
2077 ;
2078 ; CHECK IF OUTPUT CHARACTER HAS SPECIAL SIGNIFICANCE
2079 ;
2080
2081 000644 121627 000037 CMPB (SP),#37 ;;;IS THIS A CONTROL CHARACTER?
2082 000650 101076 BHI 70$ ;;;IF HI NO
2083 000652 122716 000015 CMPB #15,(SP) ;;;CARRIAGE RETURN?
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 5-8
OUTPUT-NEXT-BYTE ROUTINE
2084 000656 001426 BEQ 10$ ;;;IF EQ YES
2085 000660 122716 000014 CMPB #14,(SP) ;;;FORM FEED?
2086 000664 001450 BEQ 30$ ;;;IF EQ YES
2087 000666 122716 000013 CMPB #13,(SP) ;;;VERTICAL TAB?
2088 000672 001447 BEQ 40$ ;;;IF EQ YES
2089 000674 122716 000012 CMPB #12,(SP) ;;;LINE FEED?
2090 000700 001447 BEQ 50$ ;;;IF EQ YES
2091 000702 122716 000011 CMPB #11,(SP) ;;;HORIZONTAL TAB?
2092 000706 001071 BNE 79$ ;;;IF NE NO
2093
2094 ;
2095 ; HORIZONTAL TAB
2096 ;
2097
2098 000710 116316 000010 MOVB HORPS(R3),(SP) ;;;GET CURRENT HORIZONTAL POSITION
2099 000714 052716 177770 BIS #177770,(SP) ;;;CALCULATE BLANK COUNT TO NEXT TAB STOP
2100 000720 161613 SUB (SP),(R3) ;;;MERGE BLANK COUNT
2101 000722 112763 000040 000011 MOVB #' ,FLBYT(R3) ;;;SET FILL TO A BLANK
2102 000730 005726 5$: TST (SP)+ ;;;REMOVE BYTE FROM STACK
2103
2104 .IF DF T$$MIN
2105
2106 .IF DF T$$BTW
2107
2108 JMP OUTPT1 ;;;START OUTPUT
2109
2110 .IFF
2111
2112 000732 000624 BR OUTPT1 ;;;START OUTPUT
2113
2114 .ENDC
2115
2116 .IFF
2117
2118 JMP OUTPT1 ;;;START OUTPUT
2119
2120 .ENDC
2121
2122 ;
2123 ; CARRIAGE RETURN
2124 ;
2125
2126 000734 052713 001001 10$: BIS #CRJT+FLBT,(R3) ;;;SET CR JUST TYPED AND FORCE 1 FILL
2127 000740 032765 000000G 000000G BIT #U2.L3S,U.CW2(R5) ;;;LA30S?
2128 000746 001414 BEQ 20$ ;;;IF EQ NO
2129 000750 005046 CLR -(SP) ;;;PICKUP CURRENT HORIZONAL POSITION
2130 000752 156316 000010 BISB HORPS(R3),(SP) ;;;
2131
2132 .IF DF T$$ACR
2133
2134 14$: SUB U.CW4(R5),(SP) ;;;REDUCE THE LOGICAL HORIZONTAL
2135 BGT 14$ ;;; POSITION TO THE PHYSICAL POSITION
2136 ADD U.CW4(R5),(SP) ;;; (BETWEEN 0 AND 80).
2137
2138 .IFTF
2139
2140 000756 006216 ASR (SP) ;;;DIVIDE POSITION BY 8.
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 5-9
OUTPUT-NEXT-BYTE ROUTINE
2141 000760 006216 ASR (SP) ;;;
2142 000762 006216 ASR (SP) ;;;
2143 000764 062716 000021' ADD #FILTB,(SP) ;;;CALCULATE ADDRESS OF FILL TABLE ENTRY
2144 000770 113646 MOVB @(SP)+,-(SP) ;;;GET CORRECT FILL COUNT
2145 000772 042716 177760 BIC #^C<17>,(SP) ;;;CLEAR EXTRANEOUS BITS ON WIDE CARRIAGE
2146 000776 062613 ADD (SP)+,(R3) ;;;SET PROPER FILL COUNT
2147 001000 20$: ;;;REF LABEL
2148
2149 .IFT
2150
2151 BIT #FKCR,ATERS(R3) ;;;FAKE CARRIAGE RETURN?
2152 BNE 60$ ;;;IF NE YES -- NOT A NEW LINE
2153
2154 .ENDC
2155
2156 001000 105063 000010 27$: CLRB HORPS(R3) ;;;CLEAR HORIZONTAL POSITION
2157 001004 000415 BR 60$ ;;;OUTPUT CARRIAGE RETURN
2158
2159 ;
2160 ; FORM FEED
2161 ;
2162
2163 001006 30$: ;;;REF LABEL
2164
2165 .IF DF T$$18S
2166
2167 BIT #U2.L8S,U.CW2(R5) ;;;GOING TO A LA180S?
2168 BNE 27$ ;;;IF NE YES -- DON' CONVERT TO
2169 ;;; LF'S AND IMPLIED CR
2170
2171 .ENDC
2172
2173 001006 062713 020000 ADD #LFBT*4,(R3) ;;;ADD IN FOUR LINE FEEDS
2174
2175 ;
2176 ; VERTICAL TAB
2177 ;
2178
2179 001012 062713 020000 40$: ADD #LFBT*4,(R3) ;;;ADD IN FOUR LINE FEEDS
2180 001016 000744 BR 5$ ;;;GO BACK TO THE TOP TO PRINT THEM
2181 ; EB030
2182 .IF NDF T$$MIN ; EB030
2183 ; EB030
2184 INPT22: BR INPT2 ;;; ; EB030
2185 INPT11: BR INPT1 ;;; ; EB030
2186 ; EB030
2187 .ENDC ; EB030
2188
2189 ;
2190 ; LINE FEED
2191 ;
2192
2193 001020 042713 001000 50$: BIC #CRJT,(R3) ;;;CLEAR CARRIAGE RETURN JUST TYPED
2194 001024 032765 000000G 000000G BIT #U2.VT5,U.CW2(R5) ;;;VT05B?
2195 001032 001417 BEQ 80$ ;;;IF EQ NO
2196
2197 .IF DF L$$50H
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 5-10
OUTPUT-NEXT-BYTE ROUTINE
2198
2199 ADD #FLBT*4,(R3) ;;;SET FILL COUNT TO 4
2200
2201 .IFF
2202
2203 001034 062713 000003 ADD #FLBT*3,(R3) ;;;SET FILL COUNT TO 3
2204
2205 .ENDC
2206
2207 001040 105063 000011 60$: CLRB FLBYT(R3) ;;;SET NULL FILL BYTE
2208 001044 000412 BR 80$ ;;;
2209
2210 .IF DF T$$MIN&T$$BTW
2211
2212 INPT22: BR INPT2 ;;;
2213
2214 .ENDC
2215
2216 ;
2217 ; BYTE REQUIRES HORIZONTAL POSITION
2218 ;
2219
2220 001046 042713 001000 70$: BIC #CRJT,(R3) ;;;CLEAR CARRIAGE RETURN JUST TYPED
2221 001052 105716 TSTB (SP) ;;;BYPASS HORIZONAL POSITION CHECK?
2222 001054 100406 BMI 80$ ;;;IF MI YES
2223
2224 .IF NDF T$$ACR
2225
2226 ;
2227 ; SEE IF OUTPUT (OR ECHO) IS OFF SCREEN. THIS IMPLIES THAT NO MORE
2228 ; THAN 255. CHARACTERS CAN BE OUTPUT (TABS ARE EXPANDED INTO BLANKS
2229 ; SO THEY COUNT AS MORE THAN ONE CHARACTER) WITH ONE NORMAL WRITE.
2230 ;
2231
2232 001056 126365 000010 000000G CMPB HORPS(R3),U.CW4(R5) ;;;ANY ROOM LEFT?
2233 001064 103321 BHIS 5$ ;;;IF HIS NO
2234
2235 .IFF
2236
2237 ;
2238 ; SEE IF LINE MUST BE WRAPPED AROUND SCREEN
2239 ;
2240
2241 BIT #FKCR,ATERS(R3) ;;;LAST PRINTING CHAR WRAPPED AROUND?
2242 BNE 75$ ;;;IF NE YES -- DON'T TEST FOR WRAP
2243 CLR -(SP) ;;;MAKE THE PRESENT HORIZONTAL
2244 MOVB HORPS(R3),(SP) ;;; POSITION A WORD
2245 73$: SUB U.CW4(R5),(SP) ;;;HORIZONTAL POSITION - BUFFER SIZE
2246 BGT 73$ ;;;IF GT NOT LOGICALLY ON SAME LINE
2247 TST (SP)+ ;;;ADJUST STACK
2248 BEQ 90$ ;;;IF EQ AT RIGHT EDGE OF SCREEN
2249 75$: BIC #FKCR,ATERS(R3) ;;;CLEAR DISPLAY TRANSITION FLAG
2250
2251 .ENDC
2252
2253 001066 105263 000010 INCB HORPS(R3) ;;;INCREMENT HORIZONTAL POSITION
2254 001072 79$: ;;;REF LABEL
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 5-11
OUTPUT-NEXT-BYTE ROUTINE
2255
2256 .IF DF T$$RUB
2257
2258 CMPB #10,(SP) ;;;TRYING TO OUTPUT A BACKSPACE?
2259 BNE 80$ ;;;IF NE NO
2260 TSTB HORPS(R3) ;;;SAFE TO BACKUP ON LINE?
2261 BLE 80$ ;;;IF LE NO
2262 DECB HORPS(R3) ;;;BACKUP HORIZONTAL POSITION
2263
2264 .ENDC
2265
2266 .IIF NE MODE-100000, .ERROR MODE
2267
2268 001072 005713 80$: TST (R3) ;;;INPUT MODE?
2269 001074 100003 BPL ECHOB1 ;;;IF PL YES
2270 001076 032713 000040 BIT #CTLO,(R3) ;;;OUTPUT DISABLED?
2271 001102 001312 BNE 5$ ;;;IF NE YES
2272 001104 ECHOB1: CALLR OCHAR ;;;GO AND OUTPUT THE CHARACTER
2273
2274 .IF DF T$$ACR
2275
2276 ;
2277 ; WRAP LINE AROUND SCREEN (BLOWS TABS EXPANDING AT RIGHT EDGE)
2278 ;
2279
2280 90$: BIS #FKCR,ATERS(R3) ;;;SIGNAL LINE WRAPPING AROUND SCREEN
2281 BIT #FLCT,(R3) ;;;FILLING (DOING A TAB)?
2282 BEQ 93$ ;;;IF EQ NO
2283 MOV (R3),-(SP) ;;;CHANGE REMAINING FILL COUNT TO
2284 BIC #^C<FLCT>,(SP) ;;; A WORD
2285 CLR -(SP) ;;;DO THE SAME FOR HORIZONTAL
2286 MOVB HORPS(R3),(SP) ;;; POSITION
2287 ADD (SP)+,(SP) ;;;FORM LOGICAL SCREEN POSITION AFTER
2288 ;;; WRAPAROUND (DISPLAY WILL BE OFF)
2289 MOVB (SP)+,HORPS(R3) ;;;SAVE IT. IF THIS TRUNCATES,
2290 ;;; CONSIDER IT A HINT TO THE USER.
2291 93$: TSTB @MEBUF(R3) ;;;DOING MULTI-ECHO?
2292 BEQ 100$ ;;;IF EQ NO
2293
2294 .IF DF T$$UTB&M$$MGE
2295
2296 BIT #MCTR,ATERS(R3) ;;;DOING CONTROL/R?
2297 BEQ 95$ ;;;IF EQ NO
2298 INC U.BUF+2(R5) ;;;SHOW LAST CHAR NOT REMOVED
2299 BR 96$ ;;;
2300 95$: ;;;REF LABEL
2301
2302 .ENDC
2303
2304 DEC MEBUF(R3) ;;;SHOW LAST CHAR NOT REMOVED
2305 96$: BIS #LFBT,(R3) ;;;WANT A LINE FEED EVENTUALLY
2306 MOV #15,(SP) ;;;WANT A CARRIAGE RETURN NEXT
2307 BR 10$ ;;;
2308 100$: BIS #LFBT+FLBT,(R3) ;;;SET UP ONE FILL CHAR AND 1 LF
2309 MOVB #15,FLBYT(R3) ;;;THE FILL CHAR IS A CR
2310 CLRB 1(SP) ;;;MAKE SURE BYTE ON STACK IS ASCIZ
2311 JMP MECHO1 ;;;DEFER OVFLO CHAR TO MULTI-ECHO BUFFER
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 5-12
OUTPUT-NEXT-BYTE ROUTINE
2312
2313 .ENDC
2314
2315 .DSABL LSB
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 6
END-OF-INPUT-LINE PROCESSOR
2317 .SBTTL END-OF-INPUT-LINE PROCESSOR
2318
2319 ;
2320 ; INPT1 - FORK IN ORDER TO FINISH AN INPUT REQUEST
2321 ;
2322 ; ON ENTRY:
2323 ; R5 -> UCB
2324 ; R4 -> SCB
2325 ; INTERRUPT PRIORITY = THAT OF DEVICE INPUT CAME FROM
2326 ;
2327
2328 001110 INPT1: ;;;REF LABEL
2329
2330 .IF DF T$$RPR
2331
2332 BIT #XOFF,ATERS(R3) ;;;SEND XOFF AT READ COMPLETE?
2333 BEQ 10$ ;;;IF EQ NO
2334 BIC #XOFF,ATERS(R3) ;;;CLEAR FLAG
2335 MOV #23,-(SP) ;;;PUT XOFF ON STACK
2336 BR ECHOB1 ;;;TRANSMIT IT
2337 10$: ;;;REF LABEL
2338
2339 .ENDC
2340
2341 001110 CALL $FORK ;;;CREATE A SYSTEM PROCESS AND RETURN
2342 ; EB013
2343 .ENABL LSB ; EB013
2344
2345 ;
2346 ; END-OF-LINE FORK PROCESS
2347 ;
2348
2349 001114 010503 INPT2: MOV R5,R3 ;CALCULATE ADDRESS OF TERMINAL STATUS WORD
2350 001116 062703 000002G ADD #U.CNT+2+STATS,R3 ;
2351 001122 032723 000100 BIT #SOLI,(R3)+ ;SOLICITED INPUT?
2352 001126 001017 BNE 20$ ;IF NE YES
2353
2354 ;
2355 ; UNSOLICITED INPUT FINISHED
2356 ;
2357
2358 001130 116373 000003 000004 MOVB FNBYT-2(R3),@CURBF-2(R3) ;SET FINAL BYTE FOR MCR
2359 001136 011301 MOV (R3),R1 ;GET STARTING ADDRESS OF BUFFER
2360 001140 010541 MOV R5,-(R1) ;INSERT ADDRESS OF UCB IN BUFFER
2361 001142 005741 TST -(R1) ;POINT TO BEGINNING OF BUFFER
2362 001144 CALL $QMCRL ;INSERT BUFFER IN MCR QUEUE
2363 001150 142765 000000G 000000G 10$: BICB #US.BSY,U.STS(R5) ;CLEAR UNIT BUSY
2364 001156 105064 000000G CLRB S.STS(R4) ;CLEAR CONTROLLER (UNIT) BUSY
2365 001162 000167 176722 JTTINI: JMP TTINI ;GO AGAIN ; EB013
2366
2367 ;
2368 ; SOLICITED INPUT FINISHED
2369 ;
2370
2371 001166 012301 20$: MOV (R3)+,R1 ;GET STARTING ADDRESS OF BUFFER
2372 001170 016546 000000G MOV U.CNT(R5),-(SP) ;CALCULATE NUMBER OF BYTES IN INPUT
2373 001174 161316 SUB (R3),(SP) ; BUFFER
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 6-1
END-OF-INPUT-LINE PROCESSOR
2374 001176 112713 000000C MOVB #IS.SUC&377,(R3) ;ASSUME NORMAL COMPLETION
2375 001202 105066 000001 CLRB 1(SP) ;MAKE SURE COUNT IS POSITIVE
2376 001206 012300 MOV (R3)+,R0 ;GET FINAL BYTE (STATUS INDICATION)
2377 001210 100002 BPL 30$ ;IF PL NORMAL TERMINATION
2378 001212 105000 CLRB R0 ;PUT ERROR STATUS IN LOW BYTE OF
2379 001214 000300 SWAB R0 ; IOSB AND CLEAR UPPER BYTE
2380
2381 .IF DF T$$ESC
2382
2383 INCB -(R3) ;FOUND ESCAPE SEQUENCE?
2384 BNE 30$ ;IF NE NO
2385 MOV #IS.ESQ,R0 ;SHOW AN ESCAPE SEQUENCE IN BUFFER
2386
2387 .ENDC
2388
2389 001216 30$: ;REF LABEL
2390
2391 ;
2392 ; SEE IF NECESSARY TO MOVE THE RECEIVED CHARACTERS FROM THE
2393 ; EXECUTIVE BUFFER TO THE TASK BUFFER
2394 ;
2395
2396 .IF DF T$$UTB
2397
2398 .IF DF C$$CKP&T$$BUF
2399
2400 BIT #NCKP,U.CNT+2+ATERS(R5) ;CHARS ALREADY IN TASK BUFFER?
2401 BEQ 35$ ;IF EQ NO
2402 BIC #NCKP,U.CNT+2+ATERS(R5) ;CLEAR NOT CHECKPOINTABLE FLAG
2403
2404 .ENDC
2405
2406 MOV (SP)+,R1 ;SET NUMBER OF BYTES PROCESSED
2407 CALL $IODON ;FINISH I/O OPERATION
2408 BR JTTINI ;ANYTHING ELSE TO DO? ; EB013
2409 35$: ;REF LABEL
2410
2411 .IF DF M$$MGE
2412
2413 MOV R1,U.BUF+2(R5) ;POINT AGAIN AT TASK'S BUFFER
2414
2415 .ENDC
2416
2417 .ENDC ; DF T$$UTB
2418
2419 .IF NDF T$$UTB!NOEXBF
2420
2421 .IF DF C$$CKP&T$$BUF
2422
2423 MOV S.PKT(R4),R3 ;GET ADDRESS OF I/O PACKET
2424 MOV I.TCB(R3),R2 ;GET ADDRESS OF REQUESTER TCB
2425 BIT #T2.TIO,T.ST2(R2) ;DOING TERMINAL I/O?
2426 BNE 80$ ;IF NE YES
2427
2428 .IFTF
2429
2430 ;
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 6-2
END-OF-INPUT-LINE PROCESSOR
2431 ; MOVE CHARACTERS TO TASK'S BUFFER FROM AN EXECUTIVE BUFFER
2432 ;
2433
2434 001216 011603 MOV (SP),R3 ;SET LOOP COUNT
2435
2436 .IF DF M$$MGE
2437
2438 001220 016537 000000G 000000G MOV U.BUF(R5),@#KISAR6 ;MAP INTO TASK'S SPACE
2439
2440 .ENDC
2441
2442 001226 016502 000002G MOV U.BUF+2(R5),R2 ;POINT AT TASK'S BUFFER
2443 001232 005303 50$: DEC R3 ;ANY MORE BYTES TO MOVE?
2444 001234 002402 BLT 60$ ;IF LT NO
2445 001236 112122 MOVB (R1)+,(R2)+ ;PUT BYTE IN TASK'S BUFFER
2446 001240 000774 BR 50$ ;
2447
2448 ;
2449 ; RETURN STATUS TO TASK AND RESOURCES TO EXEC FROM SOLICITED READ
2450 ;
2451
2452 001242 012601 60$: MOV (SP)+,R1 ;SET NUMBER OF BYTES PROCESSED
2453 001244 CALL $IODON ;FINISH I/O OPERATION
2454 001250 016500 000004G MOV U.CNT+2+STRBF(R5),R0 ;RETRIEVE BUFFER ADDRESS
2455
2456 .IF DF T$$VBF
2457
2458 MOV -(R0),R1 ;GET LENGTH OF BUFFER
2459 TST -(R0) ;POINT TO BEGINNING OF BUFFER
2460
2461 .IFF
2462
2463 001254 024040 CMP -(R0),-(R0) ;POINT TO BEGINNING OF BUFFER
2464 001256 012701 000124 MOV #M$$CRB,R1 ;SET LENGTH OF BUFFER
2465
2466 .ENDC
2467
2468 001262 CALL $DEACB ;DEALLOCATE CORE BLOCK
2469 001266 000735 BR JTTINI ; ; EB013
2470
2471 .IFT ; DF C$$CKP&T$$BUF
2472
2473 ;
2474 ; HAUL THE TASK INTO MEMORY SO THE RECEIVED CHARACTERS CAN BE COPIED
2475 ; INTO THE TASK'S BUFFER. COPYING AND PACKET TERMINATION IS DONE BY
2476 ; $FINBF IN SYSXT.
2477 ;
2478
2479 80$: BIC #T2.TIO,T.ST2(R2) ;CLEAR DOING TERMINAL I/O BIT
2480 ; EB011
2481 .IF DF I$$RAR!I$$RDN!M$$MGE ; EB011
2482 ; EB011
2483 BIC #TS.RDN,T.STAT(R2) ;CLEAR I/O RUNDOWN IN PROGRESS ; EB011
2484 ; EB011
2485 .ENDC ; EB011
2486
2487 ; I.PRI HAD BETTER BE THE SAME AS T.PRI
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 6-3
END-OF-INPUT-LINE PROCESSOR
2488
2489 MOVB #200,I.PRI(R3) ;SET BUFFERED I/O FLAG
2490 MOV R0,I.PRM+6(R3) ;SAVE FINAL I/O STATUS
2491 MOV (SP)+,I.PRM+10(R3) ;SAVE NUMBER OF BYTES TRANSFERED
2492 MOV R1,I.PRM+12(R3) ;SAVE ADDRESS OF INPUT BUFFER
2493 MOV R2,R0 ;COPY TASK TCB ADDRESS
2494 ADD #T.ASTL,R2 ;POINT AT TASK'S AST QUEUE
2495 MOV (R2),(R3) ;MAKE AST ENTRY FIRST IN QUEUE.
2496 ; IS IT THE ONLY ENTRY?
2497 BNE 86$ ;IF NE NO
2498 MOV R3,T.ASTL+2(R0) ;MAKE LISTHEAD POINT AT NEW END
2499 86$: MOV R3,(R2) ;COMPLETE LINKING
2500 CALL $EXRQN ;CLEAR TS.STP, CALL $SETCR, AND
2501 BR 10$ ; CALL $NXTSK
2502
2503 .ENDC ; DF C$$CKP&T$$BUF
2504
2505 .ENDC ; NDF T$$UTB!NOEXBT
2506 ; EB013
2507 .DSABL LSB ; EB013
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7
CHARACTER INPUT INTERRUPT PROCESSOR
2509 .SBTTL CHARACTER INPUT INTERRUPT PROCESSOR
2510
2511 .ENABL LSB
2512
2513 .IF DF T$$CCA&A$$TRP
2514
2515 ;
2516 ; QUEUE AN AST BLOCK FOR AN UNSOLICITED CHARACTER
2517 ;
2518
2519 001270 1$: CALL INPT0 ;CLEAR ECHO IN PROGRESS FLAG
2520 001274 012701 000014 MOV #6*2,R1 ;LENGTH OF AST BLOCK
2521 001300 CALL $ALOCB ;ALLOCATE AN AST BLOCK
2522 001304 103432 BCS 20$ ;IF CS DIDN'T GET ONE
2523 001306 005720 TST (R0)+ ;SKIP OVER LINK WORD
2524 001310 010120 MOV R1,(R0)+ ;SAVE SIZE OF AST BLOCK
2525 001312 010001 MOV R0,R1 ;SAVE BEGINNING ADDRESS OF
2526 001314 024141 CMP -(R1),-(R1) ; AST BLOCK
2527 001316 012720 000020 MOV #10*2,(R0)+ ;SAVE BYTES TO ALLOCATE ON STACK
2528 001322 016520 000030G MOV U.CNT+2+CCAST(R5),(R0)+ ;SAVE AST TRAP ADDRESS
2529 001326 012720 000001 MOV #1,(R0)+ ;SAVE NUMBER OF AST PARAMETERS
2530 001332 012610 MOV (SP)+,(R0) ;UNSOLICITED CHAR IS AST PARAMETER
2531 001334 016500 000000G MOV U.ATT(R5),R0 ;GET ADDRESS OF TASK'S TCB
2532 001340 CALL $QASTT ;INSERT AST BLOCK IN AST QUEUE ; EB013
2533 001344 000706 BR JTTINI ; AND CALL $SETCR ; EB013
2534
2535 .ENDC
2536
2537 ;
2538 ; ICHAR - PROCESS AN INPUT CHARACTER
2539 ;
2540 ; AT ENTRY:
2541 ; R5 -> UCB
2542 ; R4 -> SCB
2543 ; R3 -> TCB (UCB + #U.CNT+2)
2544 ; INTERRUPT PRIORITY = THAT OF INTERRUPTING DEVICE
2545 ;
2546 ; INPUT CHAR IS ON TOP OF STACK AND PARITY BIT IS CLEARED (UNLESS
2547 ; INPUTTING IN READ-PASS-ALL MODE).
2548 ; EXIT VIA POPPING CHAR FROM STACK AND RETURNING OR BY
2549 ; QUEUING A FORK PROCESS AT INPT1 IF THE INPUT REQUEST IS
2550 ; SATISFIED OR BY QUEUING A FORK PROCESS AT TINP1 IF THE INPUT
2551 ; IS UNSOLICITED.
2552 ;
2553
2554 001346 ICHAR: ;;;REF LABEL
2555
2556 .IF DF T$$30P
2557
2558 BIT #ECHO,ATERS(R3) ;;;ECHOING A CHARACTER?
2559 BEQ 3$ ;;;IF EQ NO
2560
2561 ;
2562 ; THE TRANSMITTER IS BEING USED
2563 ; (WHICH IS TO SAY THE TERMINAL IS A LA30P CONNECTED BY A LC11) TO
2564 ; ECHO THE LAST CHARACTER. BUFFER THIS CHAR IN THE SOFTWARE.
2565 ;
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7-1
CHARACTER INPUT INTERRUPT PROCESSOR
2566
2567 MOVB (SP),MBUFR(R3) ;;;SAVE CHAR IN MULTIECHO BUFFER
2568 BIS #CHAR,ATERS(R3) ;;;FLAG INPUT CHAR IN BUFFER
2569 BR 20$ ;;;WORRY ABOUT CHAR WHEN TRANSMITTER
2570 3$: ;;; BECOMES FREE
2571
2572 .ENDC
2573
2574 001346 132765 000000G 000000G BITB #US.ECH,U.STS(R5) ;;;INPUT CHARACTERS LOCKED OUT? ; EB014
2575 001354 001006 BNE 20$ ;;;IF NE YES
2576 001356 152765 000000G 000000G DOCTLC: BISB #US.ECH,U.STS(R5) ;;;LOCK OUT INPUT CHARACTERS
2577 001364 RESUME: ;;;REF LABEL ; EB014
2578 ; EB090
2579 .IF DF T$$RPR ; EB090
2580 ; EB090
2581 .IIF NE RPRM-100000, .ERROR RPRM ; EB090
2582 ; EB090
2583 TST ATERS(R3) ;;;DOING A PROMPT FOR AN IO.RPR? ; EB090
2584 BMI 8$ ;;;IF MI YES ; EB090
2585 ; EB090
2586 .ENDC ; EB090
2587
2588 .IF DF T$$TRW!T$$RST
2589
2590 .IIF NE SS.RAL-200, .ERROR SS.RAL
2591
2592 BITB #SS.RAL!SS.RST,S.STS(R4) ;;;READ PASS ALL OR READ WITH
2593 ;;; SPECIAL TERMINATORS?
2594
2595 .IF DF T$$TRW&T$$LWC
2596
2597 BMI 156$ ;;;IF MI READ PASS ALL
2598
2599 .IF DF T$$RST
2600
2601 BNE 155$ ;;;IF NE YES
2602
2603 .ENDC
2604
2605 .IFF ;;; DF T$$TRW&T$$LWC
2606
2607 BNE 155$ ;;;IF NE YES
2608
2609 .ENDC ;;; DF T$$TRW&T$$LWC
2610
2611 .ENDC ;;; DF T$$TRW!T$$RST
2612
2613 001364 8$: ; SR001
2614 .IF NDF T$$NCO ;NO CONTROL/O PROCESSING ; SR001
2615 CMPB #17,(SP) ;;;CONTROL/O? ; SR001
2616 BNE 26$ ;;;IF NE NO ;**-1
2617 MOV #CTLO,-(SP) ;;;GET OUTPUT DISABLE BIT
2618 BIC (R3),(SP) ;;;.NOT.TERMINAL STATUS.AND.DISABLE BIT
2619 BIC #CTLO,(R3) ;;;.NOT.DISABLE BIT.AND.TERMINAL STATUS
2620 BIS (SP)+,(R3) ;;;DISABLE BIT.OR.TERMINAL STATUS
2621 .IFF ; SR001
2622 001364 000404 BR 26$ ;;;NO CONTROL/O ; SR001
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7-2
CHARACTER INPUT INTERRUPT PROCESSOR
2623 .ENDC ; SR001
2624 001366 10$: CALL INPT0 ;;;CLEAR ECHO IN PROGRESS
2625
2626 ;
2627 ; CONTROLLER IS BUSY ON OUTPUT. IGNORE INPUT REQUEST
2628 ;
2629
2630 001372 005726 20$: TST (SP)+ ;;;REMOVE BYTE FROM STACK
2631 001374 RETURN ;;;EXIT INTERRUPT
2632 001376 26$: ;;;REF LABEL
2633
2634 .IF DF T$$RPR
2635
2636 .IIF NE RPRM-100000, .ERROR RPRM
2637
2638 TST ATERS(R3) ;;;DOING A PROMPT FOR AN IO.RPR?
2639 BMI 10$ ;;;IF MI YES -- IGNORE CHAR IF NOT
2640 ;;; A CONTROL Q, S, OR O
2641
2642 .ENDC
2643
2644 001376 105764 000000G TSTB S.STS(R4) ;;;CONTROLLER (UNIT) BUSY?
2645 001402 001076 BNE 30$ ;;;IF NE YES
2646 001404 27$: ;;;REF LABEL
2647
2648 .IF DF T$$CCA&A$$TRP
2649
2650 001404 032763 000010 000024 BIT #CCON,ATERS(R3) ;;;CONTROL C AST CODE ACTIVE?
2651 001412 001011 BNE 140$ ;;;IF NE YES -- CHAR CAUSES AST
2652
2653 .ENDC
2654
2655 ; NEXT INSTRUCTION DEPENDS ON U2.SLV=200
2656
2657 001414 105765 000000G TSTB U.CW2(R5) ;;;SLAVE TERMINAL?
2658 001420 100762 BMI 10$ ;;;IF MI YES
2659 001422 122716 000003 CMPB #3,(SP) ;;;CONTROL C?
2660 001426 001403 BEQ 140$ ;;;IF EQ YES
2661 001430 005765 000000G TST U.ATT(R5) ;;;UNIT ATTACHED?
2662 001434 001354 BNE 10$ ;;;IF NE YES
2663
2664 ;
2665 ; UNSOLICITED INPUT REQUEST
2666 ;
2667
2668 001436 140$: ;;;REF LABEL
2669
2670 .IF DF T$$CCA&A$$TRP
2671
2672 001436 105763 000016 TSTB INPRQ(R3) ;;;ALREADY WAITING TO FORK?
2673 001442 001351 BNE 10$ ;;;IF NE YES -- IGNORE THIS CHAR
2674 ;;; RATHER THAN THE PRECEDING ONE
2675
2676 .ENDC
2677
2678 001444 111663 000016 MOVB (SP),INPRQ(R3) ;;;SAVE BYTE (ALSO UNSOL INP PNDG FLG)
2679 001450 105764 000000G TSTB S.STS(R4) ;;;UNIT BUSY ON INPUT OR OUTPUT
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7-3
CHARACTER INPUT INTERRUPT PROCESSOR
2680 001454 001344 BNE 10$ ;;;IF NE YES -- FORK LATER (TTINI)
2681 001456 052713 000200 BIS #UIFP,(R3) ;;;SET UNSOLICITED INPUT FORK PENDING
2682 001462 005726 TST (SP)+ ;;;REMOVE BYTE FROM STACK
2683 001464 CALL $FORK ;;;CREATE A SYSTEM PROCESS AND RETURN
2684
2685 ;
2686 ; UNSOLICITED INPUT FORK PROCESS
2687 ;
2688
2689 001470 016546 000020G TINP1: MOV U.CNT+2+INPRQ(R5),-(SP) ;GET INPUT BYTE AND ZERO BYTE
2690 001474 105065 000020G CLRB U.CNT+2+INPRQ(R5) ;CLEAR UNSOL INPUT PENDING FLAG
2691 001500 042765 000200 000002G BIC #UIFP,U.CNT+2+STATS(R5) ;CLEAR UNSOL INP FORK PEND FLG
2692
2693 .IF DF T$$CCA&A$$TRP
2694
2695 001506 032765 000010 000026G BIT #CCON,U.CNT+2+ATERS(R5) ;WORRY ABOUT CONTROL C AST'S?
2696 001514 001265 BNE 1$ ;IF NE YES
2697
2698 .ENDC
2699
2700 .IF DF R$$11S
2701
2702 TST $MCRPT ;BASIC MCR AROUND?
2703 BEQ 10$ ;IF EQ NO -- IGNORE CHAR
2704
2705 .ENDC
2706
2707 001516 016565 000000G 000000G MOV U.CW4(R5),U.CNT(R5) ;SET NUMBER OF BYTES REQUESTED
2708 001524 CALL GETBF ;GET BUFFER FOR INPUT AND SET R3
2709 001530 103716 BCS 10$ ;IF CS DID NOT GET ONE
2710
2711 ;
2712 ; BUFFER ALLOCATED. SET CONTROLLER AND UNIT BUSY.
2713 ;
2714
2715 001532 152765 000000G 000000G 147$: BISB #US.BSY,U.STS(R5) ;SET UNIT BUSY
2716 001540 105264 000000G INCB S.STS(R4) ;SET CONTROLLER BUSY
2717 001544 032713 001000 BIT #CRJT,(R3) ;CARRIAGE RETURN JUST TYPED?
2718 001550 001402 BEQ 150$ ;IF EQ NO
2719 001552 062713 004000 ADD #LFBT,(R3) ;ADD IN ONE LINE FEED
2720 001556 150$: MTPS S.PRI(R4) ;RAISE PRIO TO ENTER OUTPUT ROUTINES
2721 001564 122716 000003 CMPB #3,(SP) ;;;CONTROL C?
2722 001570 001010 BNE 35$ ;;;IF NE NO
2723 001572 012716 000000' MOV #CTRLC,(SP) ;;;SET ADDRESS OF MULTI-ECHO BUFFER
2724 001576 000437 152$: BR 180$ ;;;
2725
2726 .IF DF T$$TRW!T$$RST
2727
2728 155$: JMP 36$ ;;;
2729
2730 .ENDC
2731
2732 .IF DF T$$TRW&T$$LWC!T$$ESC
2733
2734 156$: JMP 37$ ;;;
2735
2736 .ENDC
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7-4
CHARACTER INPUT INTERRUPT PROCESSOR
2737
2738 .IF NDF T$$MIN
2739
2740 157$: BR 10$ ;;;
2741
2742 .ENDC ;;; NDF T$$MIN
2743
2744 ;
2745 ; CONTROLLER IS BUSY ON INPUT OR OUTPUT
2746 ;
2747
2748 .IIF NE MODE-100000, .ERROR MODE
2749
2750 001600 005713 30$: TST (R3) ;;;BUSY ON INPUT?
2751 001602 100700 BMI 27$ ;;;IF MI NO
2752 001604 122716 000003 CMPB #3,(SP) ;;;CONTROL C?
2753 001610 001675 BEQ 27$ ;;;IF EQ YES
2754
2755 ;
2756 ; PROCESS NEXT INPUT BYTE
2757 ;
2758
2759 .IF DF T$$ESC
2760
2761 BIT #ESCS,ATERS(R3) ;;;IN MIDDLE OF AN ESCAPE SEQUENCE?
2762 BNE 156$ ;;;IF NE YES
2763
2764 .ENDC
2765
2766 001612 35$: ;;;REF LABEL
2767
2768 .IF DF T$$RUB
2769
2770 CMP STRBF(R3),CURBF(R3) ;;;THIS IS FIRST CHAR FOR BUFFER?
2771 BNE 350$ ;;;IF NE NO
2772 MOVB HORPS(R3),IHORP(R3) ;;;SAVE CURRENT HORIZONTAL POSITION
2773 350$: ;;;REF LABEL
2774
2775 .ENDC
2776
2777 .IF DF T$$CTR
2778
2779 CMPB #22,(SP) ;;;CONTROL R?
2780 BNE 352$ ;;;IF NE NO
2781 ; EB037
2782 .IFF ; EB037
2783 ; EB037
2784 .IF DF T$$BTW ; EB037
2785 ; EB037
2786 BR 352$ ;;;DO NOT TREAT CHAR AS CONTROL/R ; EB037
2787 ; EB037
2788 .ENDC ; EB037
2789
2790 ;
2791 ; CONTROL R
2792 ;
2793 ; EB018
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7-5
CHARACTER INPUT INTERRUPT PROCESSOR
2794 .IFTF ; EB018
2795 ; EB018
2796 .IF DF T$$BTW ; EB018
2797 ; EB018
2798 CTRLR: ;;;REF LABEL ; EB018
2799 ; EB018
2800 .ENDC ; EB018
2801 ; EB018
2802 .IFT ; EB018
2803
2804 .IF DF T$$RNE
2805
2806 BITB #SS.RNE,S.STS(R4) ;;;IGNORE CONTROL R IF NO ECHO
2807 BNE 10$ ;;;
2808
2809 .ENDC
2810
2811 .ENDC ;;; DF T$$CTR
2812
2813 .IF DF T$$BTW!T$$CTR
2814
2815 BIC #RUBP,(R3) ;;;NEW LINE=NEW RUBOUT SEQUENCE ; EB018
2816 BIS #LFBT+FLBT,(R3) ;;;WANT 1 FILL CHAR AND 1 LF
2817 MOVB #15,FLBYT(R3) ;;;FILL CHAR IS A CR
2818
2819 .IF DF T$$UTB&M$$MGE
2820
2821 CLR -(SP) ;;;ZERO TO SHOW END OF MULTIECHO
2822 CALL $PTBYT ;;;SHOVE AT END OF TASK'S INPUT
2823 MOV STRBF(R3),U.BUF+2(R5) ;;;POINT AT START OF INPUT
2824 BIS #MCTR,ATERS(R3) ;;;FLAG THE NEED TO MAP MULTIECHO
2825 MOV #CTRLU,(SP) ;;;POINT AT A NONZERO BYTE
2826
2827 .IFF
2828
2829 CLRB @CURBF(R3) ;;;SHOW END OF CHARS
2830 MOV STRBF(R3),(SP) ;;;START FROM BEGINNING OF INPUT BUFFER
2831
2832 .ENDC
2833
2834 .IF DF T$$RUB
2835
2836 CLRB IHORP(R3) ;;;OUTPUT STARTS AT LEFT MARGIN
2837
2838 .ENDC
2839
2840 BR 180$ ;;;DO MULTI-ECHO BUFFER
2841 352$: ;;;REF LABEL
2842
2843 .ENDC ;;; DF T$$BTW!T$$CTR
2844
2845 001612 122716 000177 CMPB #177,(SP) ;;;RUBOUT?
2846 001616 001033 BNE 185$ ;;;IF NE NO
2847
2848 ;
2849 ; RUBOUT
2850 ;
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7-6
CHARACTER INPUT INTERRUPT PROCESSOR
2851
2852 001620 026363 000006 000002 CMP CURBF(R3),STRBF(R3) ;;;ANY BYTES TO RUBOUT?
2853
2854 .IF DF T$$MIN
2855
2856 001626 001657 BEQ 10$ ;;;IF EQ NO
2857
2858 .IFF
2859
2860 BEQ 157$ ;;;IF EQ NO
2861
2862 .ENDC
2863
2864 001630 005363 000006 DEC CURBF(R3) ;;;BACK UP ONE BYTE
2865
2866 .IF DF T$$UTB&M$$MGE
2867
2868 DEC U.BUF+2(R5) ;;;POINT AT LAST CHARCTER
2869 CALL $GTBYT ;;;PUT IT ON STACK
2870 DEC U.BUF+2(R5) ;;;POINT AT PLACE FOR NEXT INPUT CHAR
2871 MOV (SP)+,(SP) ;;;ADJUST STACK
2872
2873 .IFF
2874
2875 001634 117316 000006 MOVB @CURBF(R3),(SP) ;;;GET BYTE TO BE RUBBED OUT
2876
2877 .ENDC
2878
2879 001640 105263 000004 INCB RMBYT(R3) ;;;INCREMENT REMAINING SPACE IN BUFFER
2880
2881 .IF DF T$$RNE
2882
2883 BITB #SS.RNE,S.STS(R4) ;;;ECHOING CHARACTERS?
2884
2885 .IF DF T$$MIN
2886
2887 BNE 10$ ;;;IF NE NO
2888
2889 .IFF
2890
2891 BNE 157$ ;;;IF NE NO
2892
2893 .ENDC
2894
2895 .ENDC ;;; DF T$$RNE
2896
2897 .IF DF T$$RUB
2898
2899 BIT #U2.CRT,U.CW2(R5) ;;;TERMINAL A CRT?
2900 BEQ 58$ ;;;IF EQ NO
2901
2902 ;
2903 ; CRT RUBOUT
2904 ;
2905 ; CHECK TO SEE IF TRYING TO RUB OUT A TAB. IT IS THE ONLY
2906 ; CASE OF A SPECIAL CURSOR POSITIONING CHAR WE WORRY ABOUT.
2907 ; TOO BAD ABOUT THINGS LIKE BACKSPACE.
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7-7
CHARACTER INPUT INTERRUPT PROCESSOR
2908 ;
2909
2910 CMPB #11,(SP) ;;;LAST CHAR A TAB?
2911 BEQ 50$ ;;;IF EQ YES
2912
2913 .IF DF T$$ACR
2914
2915 BIS #FKCR,ATERS(R3) ;;;FLAG DO NOT WORRY ABOUT WRAPAROUND
2916
2917 .ENDC
2918
2919 MOV #CRTRUB,(SP) ;;;OVERPRINT CHAR WITH A
2920 BR 180$ ;;; BACKSPACE, SPACE, BACKSPACE
2921 50$: ;;;REF LABEL
2922
2923 .IF DF T$$UTB&M$$MGE
2924
2925 MOV STRBF(R3),U.BUF+2(R5) ;;;POINT AT START OF BUFFER
2926
2927 .IFF
2928
2929 MOV STRBF(R3),R4 ;;;POINT AT START OF INPUT LINE
2930
2931 .IFTF
2932
2933 MOVB IHORP(R3),(SP) ;;;INITIALIZE LINE POSITION
2934 BR 56$ ;;;1ST CHARACTER IS A TAB?
2935 53$: ;;;REF LABEL
2936
2937 .IFT
2938
2939 CALL $GTBYT ;;;PUT NEXT BYTE ON STACK
2940 CMPB #11,(SP)+ ;;;IS OLD CHARACTER A TAB?
2941
2942 .IFF
2943
2944 CMPB #11,(R4)+ ;;;IS OLD CHARACTER A TAB?
2945
2946 .IFTF
2947
2948 BNE 55$ ;;;IF NE NO
2949 BISB #7,(SP) ;;;BUMP COUNT TO NEXT TAB STOP
2950 55$: INCB (SP) ;;;COUNT THE CHARACTER
2951 56$: ;;;REF LABEL
2952
2953 .IFT
2954
2955 CMP U.BUF+2(R5),CURBF(R3) ;;;FOUND LAST TAB?
2956
2957 .IFF
2958
2959 CMP R4,CURBF(R3) ;;;FOUND LAST TAB?
2960
2961 .IFTF
2962
2963 BLT 53$ ;;;IF LT NO
2964 BIS #177770,(SP) ;;;-SPACES LAST TAB PUT OUT
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7-8
CHARACTER INPUT INTERRUPT PROCESSOR
2965 ADD #CRTBS,(SP) ;;;POINT AT SAME NUMBER OF BACKSPACES
2966
2967 .IFF
2968
2969 MOV U.SCB(R5),R4 ;;;RESTORE R4
2970
2971 .IFTF
2972
2973 BR 180$ ;;;BACKUP ON LINE
2974
2975 .ENDC ;;; DF T$$UTB&M$$MGE
2976
2977 58$: ;;;REF LABEL
2978
2979 .ENDC ;;; DF T$$RUB
2980
2981 001644 032713 000020 BIT #RUBP,(R3) ;;;RUBOUT ALREADY IN PROGRESS?
2982 001650 001071 BNE 120$ ;;;IF NE YES
2983 001652 052713 000020 BIS #RUBP,(R3) ;;;SET RUBOUT IN PROGRESS
2984 001656 000316 60$: SWAB (SP) ;;;SWAP BYTE TO HIGH BYTE
2985 001660 112716 000134 MOVB #'\,(SP) ;;;INSERT BACKSLASH
2986
2987 ;
2988 ; SET UP FOR MULTI-ECHO
2989 ;
2990
2991 001664 011663 000014 MECHO1: MOV (SP),MBUFR(R3) ;;;SET FOR MULTI-ECHO OF 1-2 BYTES
2992 001670 010316 MOV R3,(SP) ;;;CALCULATE ADDR OF MULTI-ECHO BUFFER
2993 001672 062716 000014 ADD #MBUFR,(SP) ;;;
2994 001676 012663 000012 180$: MOV (SP)+,MEBUF(R3) ;;;INSERT ADDRESS OF MULTI-ECHO BUFFER
2995 001702 000167 176476 JMP OUTPT1 ;;;START OUTPUT
2996 001706 122716 000025 185$: CMPB #25,(SP) ;;;LINE DELETE?
2997 001712 001013 BNE 75$ ;;;IF NE NO
2998
2999 ;
3000 ; LINE DELETE (CONTROL U)
3001 ;
3002
3003 001714 012716 000007' MOV #CTRLU,(SP) ;;;SET ADDRESS OF MULTI-ECHO BUFFER
3004 001720 042713 000020 BIC #RUBP,(R3) ;;;CLEAR RUBOUT IN PROGRESS FLAG
3005 001724 016563 000000G 000004 MOV U.CNT(R5),RMBYT(R3) ;;;RESET REMAINING BYTES IN BUFFER
3006 ;;; ALSO CLEARS FINAL BYTE INDICATOR
3007 001732 016363 000002 000006 MOV STRBF(R3),CURBF(R3) ;;;RESET ADDRESS IN BUFFER
3008
3009 .IF DF T$$UTB&M$$MGE
3010
3011 MOV STRBF(R3),U.BUF+2(R5) ;;;POINT AT START OF BUFFER
3012
3013 .ENDC
3014
3015 001740 000756 BR 180$ ;;;GO SET MULTI-ECHO BUFFER
3016 001742 122716 000033 75$: CMPB #33,(SP) ;;;ESCAPE OR ALTMODE
3017 001746 001005 BNE 85$ ;;;IF NE NO
3018
3019 ;
3020 ; ALTMODE CODE 33 (ESCAPE) AND POSSIBLY 37, 175, AND 176
3021 ;
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7-9
CHARACTER INPUT INTERRUPT PROCESSOR
3022
3023 .IF DF T$$ESC
3024
3025 BIT #WESC,ATERS(R3) ;;;TASK WANTS ESCAPE SEQUENCES?
3026 BEQ 81$ ;;;IF EQ NO
3027 BIT #U2.ESC,U.CW2(R5) ;;;TERMINAL OUTPUTS ESCAPE SEQUENCES?
3028 BEQ 81$ ;;;IF EQ NO
3029 BIS #ESCS,ATERS(R3) ;;;SHOW IN AN ESCAPE SEQUENCE
3030 CLR SYNTX(R3) ;;;SHOW HAVE ONLY THE ESC
3031 BR 37$ ;;;SAVE ESC IN BUFFER
3032
3033 .ENDC
3034
3035 001750 105016 81$: CLRB (SP) ;;;SET TO ECHO ZERO BYTE
3036 001752 112763 000033 000005 MOVB #33,FNBYT(R3) ;;;SET FINAL BYTE
3037 001760 000423 BR 115$ ;;;SET END OF LINE SEEN
3038 001762 85$: ;;;REF LABEL
3039
3040 .IF DF T$$ESC
3041
3042 BIT #U2.ESC,U.CW2(R5) ;;;TERMINAL OUTPUTS ESCAPE SEQUENCES?
3043 BEQ 87$ ;;;IF EQ NO
3044 CMPB #37,(SP) ;;;NEW "ESCAPE"?
3045 BEQ 81$ ;;;IF EQ YES
3046 87$: ;;;REF LABEL
3047
3048 .ENDC
3049
3050 .IF DF T$$LWC
3051
3052 BIT #U2.LWC,U.CW2(R5) ;;;TERMINAL IN LOWER CASE?
3053 BNE 88$ ;;;IF NE YES -- 175&176 ARE CHARS
3054
3055 .ENDC
3056
3057 001762 122716 000175 CMPB #175,(SP) ;;;ALTMODE?
3058 001766 101770 BLOS 81$ ;;;IF LOS YES
3059 001770 122716 000032 88$: CMPB #32,(SP) ;;;CONTROL Z?
3060 001774 001010 BNE 89$ ;;;IF NE NO
3061
3062 ;
3063 ; CONTROL Z (END OF FILE)
3064 ;
3065
3066 001776 112763 000000C 000005 MOVB #IE.EOF&377,FNBYT(R3) ;;;SET CONTROL Z FLAG
3067 002004 052713 000400 BIS #EOLS,(R3) ;;;SET END OF LINE SEEN
3068 002010 012716 000014' MOV #CTRLZ,(SP) ;;;SET ADDRESS OF MULTI-ECHO BUFFER
3069 002014 000730 BR 180$ ;;;
3070 002016 122716 000015 89$: CMPB #15,(SP) ;;;CARRIAGE RETURN?
3071 002022 001011 BNE 36$ ;;;IF NE NO
3072
3073 ;
3074 ; CARRIAGE RETURN
3075 ;
3076
3077 002024 111663 000005 MOVB (SP),FNBYT(R3) ;;;SET FINAL BYTE ; EB061
3078 002030 052713 000400 115$: BIS #EOLS,(R3) ;;;SET END OF LINE SEEN
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7-10
CHARACTER INPUT INTERRUPT PROCESSOR
3079 ; EB061
3080 .IF DF T$$RNE ; EB061
3081 ; EB061
3082 BITB #SS.RNE,S.STS(R4) ;;;SHOULD ECHO CR OR ESC? ; EB061
3083 BNE 48$ ;;;IF NE NO ; EB061
3084 ; EB061
3085 .ENDC ; EB061
3086 ; EB061
3087 002034 032713 074000 120$: BIT #LFCT,(R3) ;;;ANY LINE FEEDS WAITING?
3088 002040 001311 BNE MECHO1 ;;;IF NE YES
3089 002042 000167 176576 JMP ECHOB ;;;ECHO BYTE ON STACK
3090
3091 ;
3092 ; STORE BYTE IN INPUT BUFFER
3093 ;
3094
3095 002046 36$: ;;;REFERENCE BYTE
3096
3097 .IF DF T$$LWC
3098
3099 BIT #U2.LWC,U.CW2(R5) ;;;CASE CONVERSION ENABLED?
3100 BNE 37$ ;;;IF NE NO
3101 CMPB #173,(SP) ;;;UPPER END GRAPHICS?
3102 BLOS 37$ ;;;IF LOS YES
3103 CMPB #141,(SP) ;;;LOWER CASE LETTER?
3104 BHI 37$ ;;;IF HI NO
3105 BICB #40,(SP) ;;;CONVERT TO UPPER CASE
3106
3107 .ENDC
3108
3109 002046 37$: ;;;REF LABEL
3110
3111 .IF DF T$$UTB&M$$MGE
3112
3113 MOV (SP),-(SP) ;;;COPY UNKNOWN CHARCTER
3114 CALL $PTBYT ;;;PUT IT INTO TASK'S BUFFER
3115
3116 .IFF
3117
3118 002046 111673 000006 MOVB (SP),@CURBF(R3) ;;;STORE BYTE IN BUFFER
3119
3120 .ENDC
3121
3122 002052 105363 000004 DECB RMBYT(R3) ;;;ANY REMAINING SPACE IN BUFFER
3123 002056 001003 BNE 39$ ;;;IF NE YES
3124 002060 052713 000400 BIS #EOLS,(R3) ;;;TERMINATE ON BYTE COUNT
3125 002064 000402 BR 40$ ;;;
3126 002066 005263 000006 39$: INC CURBF(R3) ;;;INCREMENT BUFFER ADDRESS
3127 002072 40$: ;;;REF LABEL
3128
3129 .IF DF T$$RST
3130
3131 BITB #SS.RST,S.STS(R4) ;;;READ WITH SPECIAL TERMINATORS?
3132 BNE 46$ ;;;IF NE YES
3133
3134 .ENDC
3135
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7-11
CHARACTER INPUT INTERRUPT PROCESSOR
3136 002072 45$: ;;;REF LABEL
3137
3138 .IF DF T$$ESC
3139
3140 BIT #ESCS,ATERS(R3) ;;;DOING AN ESCAPE SEQUENCE?
3141 BNE 200$ ;;;IF NE YES
3142
3143 .ENDC
3144
3145 002072 450$: ;;;REF LABEL
3146
3147 .IF DF T$$RNE
3148
3149 BITB #SS.RNE,S.STS(R4) ;;;SUPPOSED TO ECHO CHARACTER?
3150 BNE 48$ ;;;IF NE NO
3151
3152 .ENDC
3153
3154 .IF DF T$$30P
3155
3156 BIS #ECHO,ATERS(R3) ;;;SHOW ECHOING CHAR
3157
3158 .ENDC
3159 ; EB024
3160 .IF DF T$$SYN ; EB024
3161 ; EB024
3162 BIC #UOFF!UPND,ATERS(R3) ;;;IGNORE PREVIOUS CONTROL/S ; EB024
3163 ; EB024
3164 .ENDC ; EB024
3165
3166 002072 032713 000020 BIT #RUBP,(R3) ;;;RUBOUT IN PROGRESS?
3167 002076 001756 BEQ 120$ ;;;IF EQ NO
3168 002100 042713 000020 451$: BIC #RUBP,(R3) ;;;CLEAR RUBOUT IN PROGRESS
3169
3170 .IF DF T$$ESC
3171
3172 JMP 60$ ;;;
3173
3174 .IFF
3175
3176 002104 000664 BR 60$ ;;;
3177
3178 .ENDC
3179
3180 .IF DF T$$RST
3181
3182 ;
3183 ; TERMINATE READ ON A SPECIAL TERMINATOR. A SPECIAL TERMINATOR IS
3184 ; FROM A LOWERCASE TERMINAL - ANY CHAR OUTSIDE OF [40,176]
3185 ; FROM OTHER TERMINALS - ANY CHARACTER OUTSIDE OF [40,174]
3186 ;
3187
3188 46$: CMPB (SP),#40 ;;;CHARACTER LOWER THAN RANGE?
3189 BLO 47$ ;;;IF LO YES -- IT IS A TERMINATOR
3190 CMPB (SP),#174 ;;;CHARACTER WITHIN RANGE?
3191 BLO 450$ ;;;IF LO YES -- TREAT IT NORMALLY
3192
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7-12
CHARACTER INPUT INTERRUPT PROCESSOR
3193 .IF DF T$$LWC
3194
3195 BIT #U2.LWC,U.CW2(R5) ;;;TERMINAL SET TO LOWER CASE?
3196 BEQ 47$ ;;;IF EQ NO -- ALT DECISION IS OKAY
3197 CMPB (SP),#177 ;;;CHAR IN EXPANDED ASCII RANGE?
3198 BLO 450$ ;;;IF LO YES
3199
3200 .ENDC
3201
3202 47$: BIS #EOLS,(R3) ;;;SHOW TERMINATOR FOUND
3203
3204 ; NEXT INSTRUCTION IMPLIES 7-BIT CHARACTERS (SEE AFTER INPT2)
3205
3206 MOVB (SP),FNBYT(R3) ;;;STORE FINAL BYTE FOR I/O STATUS
3207 INCB RMBYT(R3) ;;;READJUST BYTE COUNT
3208
3209 .ENDC ;;; DF T$$RST
3210
3211 .IF DF T$$ESC!T$$RNE!T$$RST!T$$TRW
3212
3213 48$: TST (SP)+ ;;;REMOVE CHARACTER FROM STACK
3214 JMP INPPT ;;;DO NOT ECHO CHARACTER
3215
3216 .ENDC
3217
3218 .IF DF T$$ESC
3219
3220 ;+
3221 ; GATHER AN ESCAPE SEQUENCE
3222 ;
3223 ; IN GENERAL, AN ESCAPE SEQUENCE IS
3224 ; ESC IC FC
3225 ; WHERE ESC = 33
3226 ; IC = ZERO OR MORE INTERMEDIATE CHARACTERS (40-57)
3227 ; FC = FINAL CHARACTER (60-176)
3228 ; THE FOLLOWING VIOLATIONS OF THAT RULE ARE ALSO ESCAPE SEQUENCES:
3229 ; ESC ; IC FC
3230 ; ESC ? IC FC
3231 ; ESC O IC SFC
3232 ; ESC P IC FC
3233 ; ESC Y CO CO
3234 ; WHERE ; = 73
3235 ; ? = 77
3236 ; O = 117
3237 ; P = 120
3238 ; Y = 131
3239 ; SFC = SPECIAL FINAL CHARACTER (100-176)
3240 ; CO = BIASED 40 COORDINATE (40-176)
3241 ; AN ESCAPE SEQUENCE TERMINATES A SOLICITED READ. A SYNTACTICALLY
3242 ; CORRECT ESCAPE SEQUENCE RETURNS A STATUS OF IS.ESQ IN THE IOSB
3243 ; AND THE ESCAPE SEQUENCE IN THE INPUT BUFFER. A SYNTACTICALLY
3244 ; INCORRECT ESCAPE SEQUENCE (RECEPTION OF A CHARACTER NOT IN THE
3245 ; LEGAL RANGE OF THE NEXT EXPECTED CHARACTER) RETURNS IE.IES
3246 ; (ILLEGAL ESCAPE SEQUENCE) IN THE IOSB AND THE INCORRECT ESCAPE
3247 ; SEQUENCE IN THE INPUT BUFFER. IF THE INPUT BUFFER IS FILLED BEFORE
3248 ; A FINAL CHARACTER IS RECEIVED, IE.PES (PARTIAL ESCAPE SEQUENCE)
3249 ; IS RETURNED. IF A RUBOUT (177) IS RECEIVED, THE PARTIAL ESCAPE
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7-13
CHARACTER INPUT INTERRUPT PROCESSOR
3250 ; SEQUENCE IS ERASED FROM THE INPUT BUFFER AND ESCAPE SEQUENCE
3251 ; RECOGNITION MODE IS EXITED.
3252 ;-
3253
3254 200$: MOV SYNTX(R3),R4 ;;;GET RULE TO HANDLE CHARACTER
3255 BNE 210$ ;;;IF NE HAVE A RULE
3256 MOV #SYNTAB,SYNTX(R3) ;;;GET RULE FOR 2ND CHARACTER
3257 204$: BIT #EOLS,(R3) ;;;PARTIAL SEQUENCE FILLS BUFFER?
3258 BNE 245$ ;;;IF NE YES
3259 BIT #RUBP,(R3) ;;;RUBOUT IN PROGRESS?
3260 BEQ 225$ ;;;IF EQ NO
3261 MOV U.SCB(R5),R4 ;;;RESTORE R4
3262 CLR (SP) ;;;FAKE OUT RUBOUT PROCESSING
3263 BR 451$ ;;;
3264 210$: CMPB #37,(SP) ;;;CHAR IN RANGE 0 -> 37?
3265 BGE 240$ ;;;IF GE YES -- SYNTAX VIOLATION
3266 CMPB #177,(SP) ;;;CHAR A DEL?
3267 BEQ 250$ ;;;IF EQ YES -- FORGET ESCAPE SEQUENCE
3268 215$: CMPB (SP),(R4)+ ;;;CHAR LESS THAN LOW VALUE OF RANGE?
3269 BLO 230$ ;;;IF LO YES -- TRY NEXT RANGE
3270 CMPB (SP),(R4)+ ;;;CHAR GREATER THAN RANGE'S HIGH VALUE?
3271 BHI 232$ ;;;IF HI YES -- NO MATCH
3272 MOV (R4),SYNTX(R3) ;;;SAVE NEXT SYNTAX RULE
3273 BNE 204$ ;;;IF NE SEQUENCE NOT COMPLETED
3274 COMB FNBYT(R3) ;;;SET A -1 TO GET IS.ESQ
3275 220$: BIS #EOLS,(R3) ;;;SHOW BUFFER COMPLETE
3276 222$: BIC #ESCS,ATERS(R3) ;;;SHOW OUT OF ESCAPE SEQUENCE
3277 225$: BICB #US.ECH,U.STS(R5) ;;;ENABLE INPUT CHAR HANDLING
3278 MOV U.SCB(R5),R4 ;;;RESTORE R4
3279 BR 48$ ;;;CLEAN UP STACK AND LEAVE WITHOUT
3280 ;;; ECHOING
3281 230$: INC R4 ;;;BUMP PAST TOP OF RANGE
3282 232$: TST (R4)+ ;;;TESTED ALL RANGES OF RULE?
3283 BNE 215$ ;;;IF NE NO -- CHECK THE NEXT
3284 240$: MOVB #IE.IES&377,FNBYT(R3) ;;;SAVE ESCAPE ERROR STATUS
3285 BR 220$ ;;;GET OUT
3286 245$: MOVB #IE.PES&377,FNBYT(R3) ;;;PARTIAL ESCAPE SEQUENCE STATUS
3287 BR 220$ ;;;
3288
3289 ;
3290 ; IGNORE THE PARTIAL ESCAPE SEQUENCE AND GET OUT OF ESCAPE SEQUENCE
3291 ; MODE
3292 ;
3293
3294 250$: TSTB RMBYT(R3) ;;;DEL FILLED BUFFER?
3295 BNE 252$ ;;;IF NE NO
3296 INC CURBF(R3) ;;;MAKE UP FOR NOT BUMPING CURBF AT 39$
3297 252$: ;;;REF LABEL
3298
3299 .IF DF T$$UTB&M$$MGE
3300
3301 DEC U.BUF+2(R5) ;;;POINT AT LAST CHAR IN BUFFER
3302 CALL $GTBYT ;;;PUT IT ONTO STACK
3303 DEC U.BUF+2(R5) ;;;POINT WHERE LAST CHAR CAME FROM
3304 DEC CURBF(R3) ;;;MAKE BOTH POINTERS AGREE
3305
3306 .IFF
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 7-14
CHARACTER INPUT INTERRUPT PROCESSOR
3307
3308 DEC CURBF(R3) ;;;POINT AT LAST CHAR IN BUFFER
3309 MOVB @CURBF(R3),-(SP) ;;;PUT IT ONTO STACK
3310
3311 .ENDC
3312
3313 INCB RMBYT(R3) ;;;SHOW INCREASED ROOM IN BUFFER
3314 CMPB #33,(SP)+ ;;;FOUND FIRST CHAR OF ESCAPE SEQUENCE?
3315 BNE 252$ ;;;IF NE NO
3316 BIC #EOLS,(R3) ;;;SHOW ARE NOT AT END OF LINE
3317 BR 222$ ;;;LEAVE
3318
3319 .ENDC ;;; DF T$$ESC
3320
3321 .DSABL LSB
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 8
MISCELLANY
3323 .SBTTL MISCELLANY
3324 ;+
3325 ; TTCAN - CANCEL I/O OPERATION ENTRY POINT (FORCE I/O COMPLETE)
3326 ;
3327 ; AT ENTRY:
3328 ; R0 -> ADDR OF ACTIVE I/O PACKET
3329 ; R1 -> ADDR OF TCB OF CURRENT TASK
3330 ; R3 -> CONTROLLER INDEX
3331 ; R4 -> ADDR OF SCB
3332 ; R5 -> ADDR OF UCB
3333 ; INTERRUPT PRIORITY=THAT OF DEVICE
3334 ;-
3335
3336 .ENABL LSB
3337
3338 .IIF NE MODE-100000, .ERROR MODE
3339
3340 002106 016502 000002G TTCAN: MOV U.CNT+2+STATS(R5),R2 ;;;UNIT BUSY ON INPUT?
3341 002112 100403 BMI 10$ ;;;IF MI NO
3342 002114 032702 000100 BIT #SOLI,R2 ;;;SOLICITED INPUT?
3343 002120 001424 BEQ 40$ ;;;IF EQ NO
3344 002122 020160 000000G 10$: CMP R1,I.TCB(R0) ;;;REQUEST FOR CURRENT TASK?
3345 002126 001021 BNE 40$ ;;;IF NE NO
3346 002130 032702 000400 15$: BIT #EOLS,R2 ;;;END OF LINE SEEN?
3347 002134 001016 BNE 40$ ;;;IF NE END OF LINE SEEN
3348
3349 .IIF NE MODE-100000, .ERROR MODE
3350
3351 002136 005702 TST R2 ;;;INPUT OR OUTPUT?
3352 002140 100403 BMI 20$ ;;;IF MI OUTPUT
3353 002142 152765 000000G 000000G BISB #US.ECH,U.STS(R5) ;;;DISABLE INPUT CHARACTER HANDLING
3354 002150 112765 000000C 000007G 20$: MOVB #IE.ABO&377,U.CNT+2+FNBYT(R5) ;;;SETUP FOR ABORT STATUS
3355 002156 052765 000400 000002G BIS #EOLS,U.CNT+2+STATS(R5) ;;;SET END OF LINE SEEN
3356 002164 112764 000001 000000G MOVB #1,S.CTM(R4) ;;;SET TIMEOUT COUNT TO 1
3357
3358 .IF DF T$$BTW!T$$ESC!T$$RPR ; EB061
3359
3360 BIC #ESCS!RPRM!XOFF!UPND!BTWQ,U.CNT+2+ATERS(R5) ;;; ; EB061
3361 ;;; CLEAR STATUS BITS THAT MAY BE SET
3362
3363 .ENDC
3364
3365 002172 40$: RETURN ;;;
3366
3367 ;
3368 ; ROUTINE EXECUTED WHENEVER A DM11 OR DZ11 LINE HANGS UP.
3369 ; CANCEL I/O AND SAY "BYE" IF NECESSARY ON A MULTIUSER SYSTEM.
3370 ;
3371
3372 .IF DF D$$M11!D$$ZMD
3373
3374 TTHUP: MOV R2,-(SP) ;;;SAVE R2
3375 CALL 80$ ;;;CANCEL I/O IF UNIT IS BUSY
3376 MOV #CTRLU-1,U.CNT+2+MEBUF(R5) ;;;SUPPRESS MULTIECHO ; EB057
3377
3378 .IF DF T$$ACR!T$$BTW!T$$CCA!T$$ESC!T$$HLD!T$$SYN!T$$18S!T$$30P ; EB057
3379
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 8-1
MISCELLANY
3380 T3=CCPN!BAKS!FKCR!ECHO!UPND!CHAR!WESC!CCON!MCTR!UOFF ; EB061
3381 BIC #T3,U.CNT+2+ATERS(R5) ;CLEAR ADDITIONAL TERMINAL STATUS ; EB061
3382
3383 .ENDC
3384
3385 .IF DF M$$MUP
3386
3387 .IF DF D$$M11
3388
3389 MTPS #0 ;;;DROP PRIORITY
3390
3391 .ENDC
3392
3393 BIT #U2.LOG,U.CW2(R5) ;TERMINAL LOGGED ON?
3394 BNE 70$ ;IF NE NO
3395 MOV R3,-(SP) ;SAVE REGISTERS NEEDED
3396 MOV R1,-(SP) ;
3397 MOV R0,-(SP) ;
3398 MOV #M$$CRB,R1 ;SET SIZE OF MCR COMMAND LINE
3399 CALL $ALOCB ;ALLOCATE MCR COMMAND LINE
3400 BCS 50$ ;IF CS ALLOCATION FAILURE
3401 MOV R0,R1 ;COPY POINTER TO BUFFER
3402 TST (R0)+ ;POINT TO UCB WORD
3403 MOV R5,(R0)+ ;PASS UCB POINTER
3404 MOV #"BY,(R0)+ ;STICK IN BYE COMMAND
3405 MOV (PC)+,(R0)+ ;
3406 .ASCII /E/<15> ;
3407 CALL $QMCRL ;QUEUE THE COMMAND
3408
3409 .IF DF D$$ZMD
3410
3411 CLC ;SHOW A SUCCESSFUL FORAY
3412
3413 .ENDC
3414 ; EB057
3415 .IF DF D$$M11 ; EB057
3416 ; EB057
3417 BR 60$ ; ; EB057
3418 ; EB057
3419 .ENDC ; EB057
3420
3421 50$: ;REF LABEL
3422
3423 .IF DF D$$M11&D$$ZMD
3424
3425 BIT #U2.DZ1,U.CW2(R5) ;THIS LINE ON A DZ11?
3426 BNE 60$ ;IF NE YES
3427
3428 .ENDC
3429
3430 .IF DF D$$M11
3431
3432 BISB #US.CRW,U.STS(R5) ;TRY AGAIN IN 4 SECONDS
3433 MOVB #1,U.CNT+2+DMTIM(R5) ;SET TIMEOUT VALUE TO 4
3434
3435 .ENDC
3436
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 8-2
MISCELLANY
3437 60$: MOV (SP)+,R0 ;RESTORE REGISTERS
3438 MOV (SP)+,R1 ;
3439 MOV (SP)+,R3 ;
3440
3441 .ENDC ; DF M$$MUP
3442
3443 70$: MOV (SP)+,R2 ;;;RESTORE R2
3444 RETURN ;;;
3445
3446 ; NEXT INSTRUCTION DEPENDS ON US.BSY=200
3447
3448 80$: TSTB U.STS(R5) ;;;UNIT BUSY?
3449 BPL 40$ ;;;IF PL NO - RETURN
3450 CLRB U.CNT+2+INPRQ(R5) ;;;CLEAR UNSOLICITED INPUT PENDING FLG
3451 MOV U.CNT+2+STATS(R5),R2 ;;;TERMINAL STATUS WORD INTO R2
3452 BR 15$ ;;;BRANCH INTO CANCEL ROUTINE
3453
3454 .ENDC
3455
3456 .DSABL LSB
3457
3458 ;
3459 ; GETBF - GET AN INPUT BUFFER AND SETUP TERMINAL CONTROL BLOCK
3460 ;
3461 ; WHEN ENTERED AT GETBF
3462 ;
3463 ; R5 -> UCB
3464 ;
3465 ; DESTROYS R0, R1, R2
3466 ; SETS R3 = UCB+U.CNT+2
3467 ; PRESERVES R4, R5, SP
3468 ;
3469 ; WHEN ENTERED AT GETBF2
3470 ;
3471 ; R1 = NUMBER OF BYTES TO ALLOCATE
3472 ; R5 -> UCB
3473 ;
3474 ; DESTROYS R0, R2
3475 ; SETS R3 = UCB+U.CNT+2
3476 ; PRESERVES R4, R5, SP
3477 ;
3478 ; EITHER ENTRY POINT GETS A BUFFER FROM THE EXEC CORE POOL AND
3479 ; MAKES THE UCB POINT TO IT
3480 ;
3481
3482 .ENABL LSB
3483
3484 002174 012701 000124 GETBF: MOV #M$$CRB,R1 ;SET LENGTH OF BUFFER REQUIRED
3485
3486 .IF DF T$$VBF
3487
3488 CMP #M$$CRI,U.CNT(R5) ;BUF=SCREEN SIZE TOO MUCH FOR MCR?
3489 BGE GETBF2 ;IF GE NO
3490 MOV #M$$CRI,U.CNT(R5) ;GIVE MCR ONLY WHAT IT CAN HANDLE
3491
3492 .IFTF
3493
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 8-3
MISCELLANY
3494 002200 GETBF2: CALL $ALOCB ;ALLOCATE A CORE BLOCK
3495 002204 103421 BCS 20$ ;IF CS NO BLOCK AVAILABLE
3496
3497 .IFT
3498
3499 TST (R0)+ ;POINT AT SECOND WORD OF BUFFER
3500 MOV R1,(R0)+ ;SAVE LENGTH OF BUFFER
3501
3502 .IFF
3503
3504 002206 022020 CMP (R0)+,(R0)+ ;POINT TO ACTUAL BUFFER AREA
3505
3506 .IFTF
3507
3508 .IF DF T$$UTB&M$$MGE
3509
3510 CLR U.BUF(R5) ;MAKE "TASK BUFFER POINTERS" POINT AT
3511 MOV R0,U.BUF+2(R5) ; THE NEW EXECUTIVE BUFFER. BUFFER TO
3512 ; TASK TRANSFER DONE BY $FINBF WHICH
3513 ; GETS MAPPING FROM I/O PACKET.
3514
3515 .ENDC
3516
3517 002210 010503 INPINI: MOV R5,R3 ;COPY UCB ADDRESS
3518 002212 062703 000000G ADD #U.CNT,R3 ;POINT TO NUMBER OF BYTES REQUESTED
3519
3520 .IFT ; DF T$$VBF
3521
3522 CMP #255.,(R3) ;BUFFER TOO BIG FOR RMBYT?
3523 BHIS 10$ ;IF HIS NO
3524 MOV #255.,(R3) ;CUT IT DOWN TO SIZE
3525
3526 .IFF ; DF T$$VBF
3527
3528 002216 022713 000120 CMP #M$$CRI,(R3) ;MORE THAN ONE BUFFER?
3529 002222 103002 BHIS 10$ ;IF HIS NO
3530 002224 012713 000120 MOV #M$$CRI,(R3) ;ALLOW ONLY ONE BUFFER'S WORTH
3531
3532 .ENDC ; DF T$$VBF
3533
3534 002230 012346 10$: MOV (R3)+,-(SP) ;SET LENGTH OF INPUT REQUEST
3535 002232 042723 176577 BIC #MODE!LFCT!CRTY!EOLS!RUBP!SOLI!CTLO!FLCT,(R3)+ ;CLEAR STATUS
3536 002236 010023 MOV R0,(R3)+ ;SET STARTING BUFFER ADDRESS
3537 002240 012623 MOV (SP)+,(R3)+ ;SET SPACE REMAINING IN BUFFER
3538 002242 010013 MOV R0,(R3) ;SET CURRENT BUFFER ADDRESS
3539 002244 162703 000006 SUB #CURBF,R3 ;POINT TO START OF CONTROL BLOCK
3540
3541 .IF DF T$$ESC
3542
3543 BIC #ESCS,ATERS(R3) ;CLEAR STATUS
3544
3545 .ENDC
3546
3547 002250 20$: RETURN ;
3548
3549 .DSABL LSB
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 9
CONTROLLER-DEPENDENT DATA BASE
3551 .SBTTL CONTROLLER-DEPENDENT DATA BASE
3552
3553 ;
3554 ; LOCAL DATA
3555 ;
3556 ; CONTROLLER IMPURE DATA TABLES (INDEXED BY CONTROLLER (UNIT) NUMBER)
3557 ;
3558
3559 .IF DF D$$L11
3560
3561 002252 CNTBL: .BLKW D$$L11 ;ADDRESS OF UNIT CONTROL BLOCK
3562
3563 .IF NDF L$$DRV!M$$MGE!LD$TT
3564
3565 .IF GT D$$L11-1
3566
3567 DLTMP: .BLKW 1 ;TEMP STORAGE FOR CONTROLLER NUMBER
3568
3569 .ENDC
3570
3571 .ENDC ; NDF L$$DRV!M$$MGE!LD$TT
3572
3573 .ENDC ; DF D$$L11
3574
3575 .IF DF D$$H11
3576
3577 DHTBL: ;REF LABEL
3578 N=0
3579 .REPT D$$H11
3580 .WORD UCBTB+N ;POINTER TO DH11 UCB TABLE
3581 N=N+34.
3582 .ENDR
3583
3584 UCBTB: ;REF LABEL
3585 .REPT D$$H11
3586 .REPT 16.
3587 .WORD 0 ;ADDR OF UCB FOR LINE (PLUGGED AT TTPWF)
3588 .ENDR
3589 .WORD 0 ;ZERO SENTINEL WORD
3590 .ENDR
3591
3592 DHCSR: .BLKW D$$H11 ;DH11 CSR ADDRESS
3593
3594 .IF NDF L$$DRV!M$$MGE!LD$TT
3595
3596 .IF GT D$$H11-1
3597
3598 DHTMP: .BLKW 1 ;TEMP STORAGE FOR CONTROLLER NUMBER
3599
3600 .ENDC
3601
3602 .ENDC ; NDF L$$DRV!M$$MGE!LD$TT
3603
3604 .IF DF D$$M11
3605
3606 DMTBL: ;DM11-BB CSR ADDRESSES
3607 .REPT D$$M11
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 9-1
CONTROLLER-DEPENDENT DATA BASE
3608 .WORD 0
3609 .ENDR
3610 CLKSW: .WORD 0 ;DM11-BB CLOCK SWITCH WORD
3611
3612 .IF NDF L$$DRV!LD$TT
3613
3614 .WORD 0,0,0,0,0 ;DM11-BB CLOCK QUEUE CONTROL BLOCK
3615 .WORD DMTMO ;DM11-BB TIMER SUBROUTINE ADDRESS
3616
3617 .IF DF L$$DRV&M$$MGE
3618 .WORD 0 ;WORD FOR APR5 BIAS
3619 .ENDC
3620
3621 .ENDC ; NDF L$$DRV!LD$TT
3622
3623 .ENDC ; DF D$$M11
3624
3625 .ENDC ; DF D$$H11
3626
3627 .IF DF D$$Z11
3628
3629 DZTBL: ;REF LABEL
3630 N=0
3631 .REPT D$$Z11
3632
3633 .WORD UCZTB+N ;POINTER TO DZ11 UCB TABLE (INDEXED BY
3634 ; CONTROLLER NUMBER)
3635 .IF DF L$$SI1
3636 .IF DF D$$ZMD
3637 N=N+10.
3638 .IFF
3639 N=N+8.
3640 .ENDC
3641 .IFF
3642 .IF DF D$$ZMD
3643 N=N+18.
3644 .IFF
3645 N=N+16.
3646 .ENDC
3647 .ENDC
3648
3649 .ENDR
3650
3651 UCZTB: ;REF LABEL
3652
3653 .REPT D$$Z11
3654
3655 .IF NDF L$$SI1
3656 .WORD 0,0,0,0 ;UCB ADDRESS FOR EACH LINE (INDEXED BY
3657 .ENDC
3658 .WORD 0,0,0,0 ; LINE (UNIT) NUMBER)
3659 .IF DF D$$ZMD
3660 .WORD 0
3661 .ENDC
3662
3663 .ENDR
3664
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 9-2
CONTROLLER-DEPENDENT DATA BASE
3665 DZCSR: .BLKW D$$Z11 ;DZ11 CSR ADDRESS
3666
3667 .IF NDF L$$DRV!M$$MGE!LD$TT
3668
3669 .IF GT D$$Z11-1
3670
3671 DZTMP: .WORD 0 ;TEMP STORAGE FOR CONTROLLER NUMBER
3672
3673 .ENDC
3674
3675 .ENDC ; NDF L$$DRV!M$$MGE!LD$TT
3676
3677 .IF DF D$$ZMD
3678
3679 DZCLKS: .WORD 0 ;DZ11 CLOCK SWITCH WORD
3680
3681 .IF NDF L$$DRV!LD$TT
3682
3683 .WORD 0,0,0,0,0 ;DZ11 CLOCK QUEUE ENTRY
3684 .WORD DZTMO ;DZ11 TIMEOUT ENTRY POINT
3685
3686 .IF DF L$$DRV&M$$MGE
3687 .WORD 0 ;WORD FOR APR5 BIAS
3688 .ENDC
3689
3690 .ENDC ; NDF L$$DRV!LD$TT
3691
3692 .ENDC ; DF D$$ZMD
3693
3694 .ENDC ; DF D$$Z11
3695
3696 .IF DF D$$J11
3697
3698 DJTBL: ;REF LABEL
3699 N=0
3700
3701 .REPT D$$J11
3702 .WORD UCJTB+N ;POINTER TO DJ11 UCB TABLE
3703 N=N+32.
3704 .ENDR
3705
3706 UCJTB: ;REF LABEL
3707
3708 .REPT D$$J11
3709 .REPT 16.
3710 .WORD 0 ;ADDRESS OF LINE'S UCB
3711 .ENDR
3712 .ENDR
3713
3714 DJCSR: .BLKW D$$J11 ;DJ11 CSR ADDRESS
3715
3716 .IF NDF L$$DRV!M$$MGE!LD$TT
3717
3718 .IF GT D$$J11-1
3719
3720 DJTMP: .BLKW 1 ;TEMP STORAGE FOR CONTROLLER NUMBER
3721
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 9-3
CONTROLLER-DEPENDENT DATA BASE
3722 .ENDC
3723
3724 .ENDC ; NDF L$$DRV!M$$MGE!LD$TT
3725
3726 .ENDC ; DF D$$J11
3727
3728 ;+
3729 ; DRIVER DISPATCH TABLE
3730 ;
3731 ; THE $XYTBL GLOBAL SYMBOLS ARE FOR EASING THE MENTAL BURDEN WHEN
3732 ; CREATING LOADABLE USER TERMINAL DRIVERS FOR TEST PURPOSES
3733 ;-
3734
3735 .IF DF LD$$L
3736 $DLTBL::
3737 .ENDC
3738
3739 .IF DF LD$$H
3740 $DHTBL::
3741 .ENDC
3742
3743 .IF DF LD$$J
3744 $DJTBL::
3745 .ENDC
3746
3747 .IF DF LD$$Z
3748 $DZTBL::
3749 .ENDC
3750
3751 .IF NDF LD$$L & LD$$H & LD$$J & LD$$Z
3752 002254 $TTTBL::
3753 .ENDC
3754
3755 .IF DF T$$BTW!T$$RPR
3756
3757 .WORD TTCHK ;DEVICE INITIATOR ENTRY POINT
3758
3759 .IFF
3760
3761 002254 000110' .WORD TTINI ;DEVICE INITIATOR ENTRY POINT
3762
3763 .ENDC
3764
3765 002256 002106' .WORD TTCAN ;CANCEL I/O OPERATION ENTRY POINT
3766 002260 002320' .WORD TTOUT ;DEVICE TIMEOUT ENTRY POINT
3767 002262 002422' .WORD TTPWF ;POWERFAIL ENTRY POINT
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 10
CONTROLLER-DEPENDENT OUTPUT INTERRUPT CODE
3769 .SBTTL CONTROLLER-DEPENDENT OUTPUT INTERRUPT CODE
3770
3771 .ENABL LSB
3772
3773 ;+
3774 ; **-$DZOUT-DZ11 TERMINAL MULTIPLEXER OUTPUT INTERRUPTS
3775 ;-
3776
3777 .IF DF D$$Z11
3778
3779 $DZOUT:: ;REF LABEL
3780 TTSAV$ DZ,PR5,D$$Z11 ;;;SAVE R3, R4, R5 AND LOWER
3781 ;;; INTERRUPT PRIORITY
3782 ;;; SET R3=ADDR OF UCB TABLE
3783 ;;; SET R4=CSR OF INTERRUPTER
3784 MOVB 1(R4),R5 ;;;GET BYTE CONTAINING LINE NUMBER
3785 BIC #177770,R5 ;;;ISOLATE LINE NUMBER
3786 ASL R5 ;;;MAKE IT INTO A WORD INDEX
3787 MOV R5,-(SP) ;;;SAVE IT
3788 ADD R3,R5 ;;;ADDR OF ADDR OF UCB FOR LINE
3789 MOV (R5),R5 ;;;ADDR OF UCB FOR LINE
3790 MOV (SP)+,R3 ;;;SET R3 TO LINE NUMBER
3791 BITB #US.OUT,U.STS(R5) ;;;EXPECT INTERRUPT?
3792 BNE 3$ ;;;IF NE YES
3793 BICB $BTMSK(R3),4(R4) ;;;SHOW NO DESIRE TO TRANSMIT
3794 MOV U.SCB(R5),R4 ;;;SET R4 TO START OF SCB
3795 BR 40$ ;;;DONE
3796 3$: MOVB U.CNT+2+DHBUF(R5),6(R4) ;;;TRANSMIT BYTE
3797
3798 .IF DF D$$J11
3799
3800 BR 5$
3801
3802 .ENDC
3803
3804 .ENDC ;;; DF D$$Z11
3805
3806 ;+
3807 ; **-$DJOUT-DJ11 TERMINAL MULTIPLEXER OUTPUT INTERRUPTS
3808 ;-
3809
3810
3811 .IF DF D$$J11
3812
3813 $DJOUT:: ;;;REF LABEL
3814 TTSAV$ DJ,PR5,D$$J11 ;;;SAVE R3, R4, R5 AND LOWER
3815 ;;; INTERRRUPT PRIORITY
3816 ;;; SET R3=ADDR OF UCB TABLE
3817 ;;; SET R4=CSR OF INTERRUPTER
3818 MOV R3,R5 ;;;COPY ADDRESS OF UCB TABLE
3819 ADD #7,R4 ;;;POINT TO UNIT NUMBER
3820 MOVB (R4),R3 ;;;GET INTERRUPTING UNIT
3821 BIC #177760,R3 ;;;CLEAR EXCESS BITS
3822 ASL R3 ;;;CONVERT UNIT NUMBER TO WORD INDEX
3823 ADD R3,R5 ;;;CALCULATE ADDRESS OF UCB ADDRESS
3824 MOV (R5),R5 ;;;GET ADDRESS OF UCB
3825 BEQ 40$ ;;;IF EQ NO UCB -- IGNORE INTERRUPT
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 10-1
CONTROLLER-DEPENDENT OUTPUT INTERRUPT CODE
3826 MOVB U.CNT+2+DHBUF(R5),-(R4) ;;;OUTPUT NEXT BYTE
3827 BIC $BTMSK(R3),-(R4) ;;;CLEAR BUFFER ACTIVE
3828
3829 .ENDC ;;; DF D$$J11
3830
3831 .IF DF D$$J11!D$$Z11
3832
3833 5$: MOV U.SCB(R5),R4 ;;;GET ADDRESS OF SCB
3834 MOV R5,R3 ;;;CALCULATE ADDRESS OF TERMINAL STATUS
3835 ADD #U.CNT+2+STATS,R3 ;;;
3836
3837 .IF DF D$$H11!D$$L11
3838
3839 BR 35$ ;;;
3840
3841 .ENDC
3842
3843 .ENDC ;;; DF D$$J11!D$$Z11
3844
3845 ;+
3846 ; **-$DHOUT-DH11 TERMINAL MULTIPLEXER OUTPUT INTERRUPTS
3847 ;-
3848
3849
3850 .IF DF D$$H11
3851
3852 $DHOUT:: ;;;REF LABEL
3853 TTSAV$ DH,PR5,D$$H11 ;;;SAVE R3, R4, R5 AND LOWER
3854 ;;; INTERRUPT PRIORITY
3855 ;;; SET R3=ADDR OF UCB TABLE
3856 ;;; SET R4=CSR OF INTERRUPTER
3857 BIC #101077,(R4) ;;;CLEAR CURRENT UNIT AND TRANSMIT INT
3858 10$: MOV (R3)+,R5 ;;;UNIT EXIST?
3859 BEQ 40$ ;;;IF EQ NO -- DONE
3860 BITB #US.OUT,U.STS(R5) ;;;OUTPUT INTERRUPT EXPECTED?
3861 BEQ 20$ ;;;IF EQ NO
3862 TST 10(R4) ;;;ZERO BYTE COUNT?
3863 BEQ 30$ ;;;IF EQ YES
3864 20$: INC (R4) ;;;INCREMENT UNIT NUMBER
3865 BR 10$ ;;;TRY AGAIN
3866 30$: MOV R4,-(SP) ;;;SAVE R4 AND R3
3867 MOV R3,-(SP) ;;;
3868 MOV U.SCB(R5),R4 ;;;GET ADDRESS OF SCB
3869 MOV R5,R3 ;;;CALCULATE ADDRESS OF TERMINAL STATUS WORD
3870 ADD #U.CNT+2+STATS,R3 ;;;
3871 CALL 50$ ;;;FINISH OUTPUT PROCESSING
3872 MTPS #PR5 ;;;OUTPT MAY RETURN THRU $FORK
3873 MOV (SP)+,R3 ;;;RESTORE R3 AND R4
3874 MOV (SP)+,R4 ;;;
3875 BR 20$ ;;;GO AGAIN
3876
3877 .ENDC
3878
3879 ;+
3880 ; **-$DLOUT-DL11 TERMINAL OUTPUT INTERRUPTS
3881 ;-
3882
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 10-2
CONTROLLER-DEPENDENT OUTPUT INTERRUPT CODE
3883 .IF DF D$$L11
3884 002264 $TTOUT:: ;;;REFERENCE LABEL
3885 002264 $DLOUT:: ;;;REF LABEL
3886 002264 TTSAV$ DL,PR4,D$$L11 ;;;SAVE R3, R4, R5 AND LOWER
3887 ;;; INTERRUPT PRIORITY
3888 ;;; SET R3= R5+U.CNT+2
3889 ;;; SET R4=ADDRESS OF SCB
3890 ;;; SET R5=ADDRESS OF UCB
3891
3892 .ENDC
3893
3894 .IF DF D$$J11!D$$L11!D$$Z11
3895
3896 002270 132765 000000G 000000G 35$: BITB #US.OUT,U.STS(R5) ;;;OUTPUT INTERRUPT EXPECTED?
3897 002276 001001 BNE 50$ ;;;IF NE YES
3898
3899 .ENDC
3900
3901 002300 40$: RETURN ;;;IGNORE SPURIOUS INTERRUPTS
3902 002302 142765 000000G 000000G 50$: BICB #US.OUT,U.STS(R5) ;;;CLEAR OUTPUT INTERRUPT EXPECTED
3903 002310 105064 000000G CLRB S.CTM(R4) ;;;DISABLE UNIT TIMEOUT
3904 002314 CALLR OUTPT ;;;OUTPUT NEXT BYTE, IF THERE IS ONE
3905
3906 .DSABL LSB
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 11
TERMINAL TIMEOUT ROUTINE
3908 .SBTTL TERMINAL TIMEOUT ROUTINE
3909
3910 ;+
3911 ; TTOUT - TERMINAL DRIVER TIMEOUT ENTRY POINT
3912 ;
3913 ; ENTERED AT FORK LEVEL WITH
3914 ; R5 -> UCB
3915 ; R4 -> SCB
3916 ; R3 -> CONTROLLER NUMBER
3917 ; R2 -> CSR
3918 ; R0 -> IE.DNR
3919 ; INTERRUPT PRIORITY = THAT OF DEVICE
3920 ;
3921 ; EXITS BY GOING TO COMMON CODE AFTER REENABLING INTERRUPTS ON
3922 ; DEVICE
3923 ;-
3924
3925 002320 TTOUT: ;;;REF LABEL
3926
3927 .IF DF D$$H11!D$$J11!D$$Z11
3928
3929 MOV U.CW2(R5),R1 ;;;MULTIPLEXED TERMINAL?
3930
3931 .IF DF D$$L11
3932
3933 ; NEXT INSTRUCTION DEPENDS ON U2.DH1=100000
3934
3935 BPL 25$ ;;;IF PL NO
3936
3937 .ENDC
3938
3939 .IF DF D$$H11
3940
3941 .IF DF D$$J11!D$$Z11
3942
3943 ASL R1 ;;;DJ11 TERMINAL?
3944
3945 .IF DF D$$J11
3946
3947 ; NEXT INSTRUCTION DEPENDS ON U2.DJ1=U2.DH1/2
3948
3949 BMI 23$ ;;;IF MI YES
3950
3951 .ENDC
3952
3953 .IF DF D$$Z11
3954
3955 TSTB R1 ;;;DZ11 TERMINAL?
3956
3957 ; NEXT INSTRUCTION DEPENDS ON U2.DZ1=100
3958
3959 BMI 22$ ;;;IF MI YES
3960
3961 .ENDC
3962
3963 .ENDC ;;; DF D$$J11!D$$Z11
3964
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 11-1
TERMINAL TIMEOUT ROUTINE
3965 BIC #1077,(R2) ;;;CLEAR CURRENT UNIT
3966 BIS #20100,(R2) ;;;MAKE SURE INTERRUPTS ARE ENABLED
3967 BISB U.UNIT(R5),(R2) ;;;SELECT DESIRED UNIT
3968 CLR 10(R2) ;;;ZERO BYTE COUNT
3969
3970 .IF DF D$$J11!D$$Z11
3971
3972 BR 25$ ;;;
3973
3974 .ENDC
3975
3976 .IFF ;;; DF D$$H11
3977
3978 .IF DF D$$J11&D$$Z11
3979
3980 ASL R1 ;;;DJ11 TERMINAL?
3981
3982 ; NEXT INSTRUCTION DEPENDS ON U2.DJ1=U2.DH1/2
3983
3984 BMI 23$ ;;;IF NE YES
3985
3986 .ENDC
3987
3988 .ENDC ;;; DF D$$H11
3989
3990 .IF DF D$$Z11
3991
3992 22$: BIS #40140,(R2) ;;;MAKE SURE INTERRUPTS ENABLED
3993
3994 .IF DF D$$J11
3995
3996 BR 25$ ;;;
3997
3998 .ENDC
3999
4000 .ENDC ;;; DF D$$Z11
4001
4002 .IF DF D$$J11
4003
4004 23$: BIS #40501,(R2) ;;;MAKE SURE INTERRUPTS ARE ENABLED
4005
4006 .ENDC
4007
4008 .ENDC ;;; DF D$$H11!D$$J11!D$$Z11
4009
4010 002320 142765 000000G 000000G 25$: BICB #US.OUT,U.STS(R5) ;;;CLEAR OUTPUT INTERRUPT EXPECTED
4011 002326 MTPS #0 ;;;ALLOW DEVICE INTERRUPTS
4012 002332 CALLR TTOUT1 ;
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 12
CONTROLLER-DEPENDENT OUTPUT CHAR ROUTINE
4014 .SBTTL CONTROLLER-DEPENDENT OUTPUT CHAR ROUTINE
4015
4016 ;
4017 ; OCHAR - OUTPUT A CHARACTER TO A TERMINAL
4018 ;
4019 ; AT ENTRY:
4020 ; R5 -> UCB
4021 ; R4 -> SCB
4022 ; (SP) = CHAR TO OUTPUT
4023 ; INTERRUPT PRIORITY = THAT OF OUTPUT DEVICE
4024 ;
4025 ; EXITS VIA RETURN
4026 ;
4027
4028 .ENABL LSB
4029
4030 002336 OCHAR: ;;;REF LABEL
4031
4032 .IF DF T$$SYN!T$$18S
4033
4034 BIT #UOFF,U.CNT+2+ATERS(R5) ;;;OUTPUT TURNED OFF?
4035 BNE 100$ ;;;IF NE YES
4036
4037 .IFTF
4038
4039 002336 016403 000000G FCHAR: MOV S.CSR(R4),R3 ;;;GET ADDRESS OF CSR
4040 002342 116464 000000G 000000G MOVB S.ITM(R4),S.CTM(R4) ;;;ENABLE TIMEOUT
4041
4042 .IF DF D$$H11!D$$J11!D$$Z11
4043
4044 .IF DF D$$L11
4045
4046 TST U.CW2(R5) ;;;MULTIPLEXED TERMINAL?
4047
4048 ; NEXT INSTRUCTION DEPENDS ON U2.DH1=100000
4049
4050 BPL 90$ ;;;IF PL NO
4051
4052 .ENDC
4053
4054 MOVB (SP)+,U.CNT+2+DHBUF(R5) ;;;PUT BYTE IN OUTPUT BUFFER
4055 MOVB U.UNIT(R5),R4 ;;;GET PHYSICAL UNIT NUMBER
4056
4057 .IF DF D$$H11
4058
4059 .IF DF D$$J11!D$$Z11
4060
4061 BIT #U2.DJ1!U2.DZ1,U.CW2(R5) ;;;DJ11 OR DZ11?
4062 BNE 83$ ;;;IF NE YES
4063
4064 .IFTF
4065
4066 BIC #1077,(R3) ;;;CLEAR CURRENT UNIT
4067 BIS R4,(R3) ;;;SELECT DESIRED UNIT
4068 BIC #60,(R3)+ ;;;
4069 ADD #4,R3 ;;;POINT TO CURRENT ADDRESS REGISTER
4070 MOV R5,(R3) ;;;CALCULATE ADDRESS OF BYTE BUFFER
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 12-1
CONTROLLER-DEPENDENT OUTPUT CHAR ROUTINE
4071 ADD #U.CNT+2+DHBUF,(R3)+ ;;;
4072 MOV #-1,(R3)+ ;;;SET BYTE COUNT TO MINUS ONE
4073
4074 .IFT
4075
4076 BR 87$ ;;;
4077
4078 .ENDC
4079
4080 .IFTF ;;; DF D$$H11
4081
4082 .IF DF D$$J11!D$$Z11
4083
4084 83$: ADD #4,R3 ;;;POINT TO BUFFER ACTIVE REGISTER
4085
4086 .ENDC
4087
4088 87$: ASL R4 ;;;CONVERT UNIT NUMBER TO WORD INDEX
4089 BIS $BTMSK(R4),(R3) ;;;START OUTPUT
4090
4091 .IF DF D$$L11
4092
4093 BR 95$ ;;;SET OUTPUT INT EXPECTED AND EXIT
4094
4095 .ENDC
4096
4097 .ENDC ;;; DF D$$H11
4098
4099 .ENDC ;;; DF D$$H11!D$$J11!D$$Z11
4100
4101 .IF DF D$$L11
4102
4103 002350 112663 000006 90$: MOVB (SP)+,6(R3) ;;;OUTPUT BYTE
4104 002354 052763 000100 000004 BIS #100,4(R3) ;;;ENABLE OUTPUT INTERRUPT
4105
4106 .ENDC
4107
4108 002362 152765 000000G 000000G 95$: BISB #US.OUT,U.STS(R5) ;;;SET OUTPUT INTERRUPT EXPECTED
4109 002370 RETURN ;;;
4110
4111 .IFT ;;; DF T$$SYN!T$$18S
4112
4113 100$: MOVB (SP)+,U.CNT+2+DHBUF(R5) ;;;SAVE BYTE TO OUTPUT
4114 BIS #UPND,U.CNT+2+ATERS(R5) ;;;SET OUTPUT BYTE PENDING
4115 RETURN ;;;
4116
4117 .ENDC ;;; DF T$$SYN!T$$18S
4118
4119
4120 .DSABL LSB
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 13
CONTROLLER-DEPENDENT INPUT INTERRUPT CODE
4122 .SBTTL CONTROLLER-DEPENDENT INPUT INTERRUPT CODE
4123
4124 .ENABL LSB
4125
4126 ;+
4127 ; **-$DZINP-DZ11 TERMINAL MULTIPLEXER INPUT INTERRUPTS
4128 ;-
4129
4130 .IF DF D$$Z11
4131
4132 $DZINP:: ;;;REF LABEL
4133 TTSAV$ DZ,PR5,D$$Z11 ;;;SAVE R3, R4, R5 AND LOWER
4134 ;;; INTERRUPT PRIORITY
4135 ;;; SET R3=ADDR OF UCB TABLE
4136 ;;; SET R4=CSR OF INTERRUPTER
4137
4138 .IF DF D$$H11!D$$J11
4139
4140 BR 1$ ;;;
4141
4142 .ENDC
4143
4144 .ENDC ;;; DF D$$Z11
4145
4146 ;+
4147 ; **-$DJINP-DJ11 TERMINAL MULTIPLEXER INPUT INTERRUPTS
4148 ;-
4149
4150 .IF DF D$$J11
4151
4152 $DJINP:: ;;;REF LABEL
4153 TTSAV$ DJ,PR5,D$$J11 ;;;SAVE R3, R4, R5 AND LOWER
4154 ;;; INTERRUPT PRIORITY
4155 ;;; SET R3=ADDR OF UCB TABLE
4156 ;;; SET R4=CSR OF INTERRUPTER
4157
4158 .IF DF D$$H11
4159
4160 BR 1$ ;;;
4161
4162 .ENDC
4163
4164 .ENDC ;;; DF D$$J11
4165
4166 .IF DF D$$H11
4167
4168 ;+
4169 ; **-$DHINP-DH11 TERMINAL MULTIPLEXER INPUT INTERRUPTS
4170 ;-
4171
4172 $DHINP:: ;;;REF LABEL
4173 TTSAV$ DH,PR5,D$$H11 ;;;SAVE R3, R4, R5 AND LOWER
4174 ;;; INTERRUPT PRIORITY
4175 ;;; SET R3=ADDR OF UCB TABLE
4176 ;;; SET R4=CSR OF INTERRUPTER
4177
4178 .ENDC
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 13-1
CONTROLLER-DEPENDENT INPUT INTERRUPT CODE
4179
4180 .IF DF D$$H11!D$$J11!D$$Z11
4181
4182 1$: MOV 2(R4),-(SP) ;;;GET NEXT BYTE FROM SILO
4183 BPL 5$ ;;;IF PL SILO IS EMPTY
4184 MOVB 1(SP),R5 ;;;GET PHYSICAL UNIT NUMBER
4185 BIC #177760,R5 ;;;CLEAR EXCESS BITS
4186 ASL R5 ;;;CONVERT UNIT NUMBER TO WORD INDEX
4187 ADD R3,R5 ;;;ADD BASE ADDRESS OF UCB TABLE
4188 MOV (R5),R5 ;;;GET ADDRESS OF UCB
4189 BEQ 5$ ;;;IF EQ SPURIOUS INTERRUPT
4190 ; EB055
4191 .IF DF D$$M11&D$$H11!D$$ZMD ; EB055
4192 ; EB055
4193 BITB #US.DSB,U.STS(R5) ;;;UNIT DISABLED?
4194 BNE 5$ ;;;IF NE YES
4195 ; EB055
4196 .ENDC ; EB055
4197 ; EB055
4198 MOV U.SCB(R5),R4 ;;;GET ADDRESS OF SCB
4199 MOV R5,R3 ;;;CALCULATE ADDRESS OF TERMINAL STATUS WORD
4200 ADD #U.CNT+2+STATS,R3 ;;;
4201
4202 .IF DF D$$L11
4203
4204 BR 2$ ;;;FINISH IN COMMON CODE
4205
4206 .ENDC
4207
4208 .ENDC ;;; DF D$$H11!D$$J11!D$$Z11
4209
4210 ;+
4211 ; **-$DLINP-DL11 TERMINAL INPUT INTERRUPT
4212 ;-
4213
4214 .IF DF D$$L11
4215
4216 002372 $TTINP:: ;;;REFERENCE LABEL
4217 002372 $DLINP:: ;;;REF LABEL
4218 002372 TTSAV$ DL,PR4,D$$L11 ;;;SAVE R3, R4, R5 AND LOWER
4219 ;;; INTERRUPT PRIORITY
4220 ;;; SET R3=R5+U.CNT+2
4221 ;;; SET R4=ADDRESS OF SCB
4222 ;;; SET R5=ADDRESS OF UCB
4223 002376 016446 000000G MOV S.CSR(R4),-(SP) ;;;GET ADDRESS OF CSR
4224 002402 062716 000002 ADD #2,(SP) ;;;POINT TO DATA BUFFER REGISTER
4225 002406 017616 000000 MOV @(SP),(SP) ;;;GET INPUT BYTE AND ERROR BITS
4226
4227 .ENDC
4228
4229 002412 2$: ;;;REF LABEL
4230
4231 .IF NDF T$$MIN
4232
4233 BIT #60000,(SP) ;;;HAD A HARD ERROR?
4234 BNE 5$ ;;;IF NE YES
4235
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 13-2
CONTROLLER-DEPENDENT INPUT INTERRUPT CODE
4236 .ENDC
4237
4238 .IF DF T$$TRW
4239
4240 .IIF NE SS.RAL-200, .ERROR SS.RAL
4241
4242 TSTB S.STS(R4) ;;;READ PASS ALL?
4243 BMI 3$ ;;;IF MI YES
4244
4245 .ENDC
4246
4247 002412 042716 177600 BIC #177600,(SP) ;;;CLEAR PARITY BIT AND HIGH BYTE
4248
4249 .IF DF T$$HLD!T$$SYN!T$$18S
4250
4251 CMPB #23,(SP) ;;;TURN OUTPUT OFF?
4252 BEQ 4$ ;;;IF EQ YES
4253 CMPB #21,(SP) ;;;TURN OUTPUT ON?
4254 BEQ 6$ ;;;IF EQ YES
4255
4256 .ENDC
4257
4258 .IF DF T$$HLD!T$$SYN
4259
4260 CMPB #3,(SP) ;;;CHARACTER A CONTROL C?
4261 BEQ 8$ ;;;IF EQ YES
4262
4263 .ENDC
4264
4265 002416 3$: CALLR ICHAR
4266
4267 .IF DF T$$HLD!T$$SYN!T$$18S
4268
4269 ;
4270 ; TURN OUTPUT OFF (RECEIVED A XOFF)
4271 ;
4272
4273 4$: BIS #UOFF,ATERS(R3) ;;;TURN OUTPUT OFF
4274
4275 .IFTF
4276
4277 .IF DF T$$MIN
4278
4279 .IF DF D$$H11!D$$J11!D$$Z11!T$$18S ;BS035
4280
4281 5$: TST (SP)+ ;;;NOW IGNORE CHARACTER
4282 RETURN ;;;RETURN FROM INTERRUPT
4283
4284 .ENDC
4285
4286 .IFF ;;; DF T$$MIN
4287
4288 5$: TST (SP)+ ;;;NOW IGNORE CHARACTER
4289 RETURN ;;;RETURN FROM INTERRUPT
4290
4291 .ENDC
4292
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 13-3
CONTROLLER-DEPENDENT INPUT INTERRUPT CODE
4293 .IFT ;;; DF T$$HLD!T$$SYN!T$$18S
4294
4295 ;
4296 ; TURN OUTPUT ON (RECEIVED A XON)
4297 ;
4298
4299 6$: BIC #UOFF,ATERS(R3) ;;;CLEAR HOLD OUTPUT FLAG
4300
4301 .IIF NE UPND-200, .ERROR UPND
4302
4303 TSTB ATERS(R3) ;;;OUTPUT BYTE PENDING?
4304 BPL 5$ ;;;IF PL NO
4305 7$: MOVB DHBUF(R3),(SP) ;;;GET HELD UP BYTE
4306 7000$: BIC #UPND,ATERS(R3) ;;;CLEAR OUTPUT BYTE PENDING FLAG
4307 CALLR OCHAR ;;;OUTPUT BYTE
4308
4309 .ENDC ;;; DF T$$HLD!T$$SYN!T$$18S
4310
4311 .IF DF T$$HLD!T$$SYN
4312
4313 ;
4314 ; RECEIVED A CONTROL C. IF IN HOLD-SCREEN MODE, GET OUT OF IT.
4315 ; IF OUTPUT TURNED OFF, TURN IT ON. IN ANY CASE, GET TO MCR.
4316 ;
4317
4318 8$: BIC #UOFF,ATERS(R3) ;;;TURN OUTPUT ON
4319
4320 .ENDC
4321
4322 .IF DF T$$HLD
4323
4324 BIT #U2.HLD,U.CW2(R5) ;;;IN HOLD-SCREEN MODE?
4325
4326 .IF DF T$$SYN
4327
4328 BEQ 9$ ;;;IF EQ NO
4329
4330 .IFF
4331
4332 BEQ 3$ ;;;IF EQ NO
4333
4334 .ENDC
4335
4336 BIS #BAKS!CCPN,ATERS(R3) ;;;FLAG SPECIAL MULTI-ECHO AND
4337 ;;; HAVE CONTROL/C
4338 BIC #U2.HLD,U.CW2(R5) ;;;SHOW NOT IN HOLD-SCREEN MODE
4339
4340 ;
4341 ; WANT TO GET OUT OF HOLD-SCREEN MODE (SEND "ESC \" TO TERMINAL AND
4342 ; HOPE IT EVENTUALLY PAYS ATTENTION), SEND CHAR HELD UP BY CONTROL/S,
4343 ; AND PROMPT WITH "MCR>." ASSUME WE CANNOT IMMEDIATELY KICK TERMINAL
4344 ; OUT OF HOLD-SCREEN MODE (THE TERMINAL'S SILO AND THE INTERFACE'S
4345 ; DOUBLE BUFFERING PROBABLY HAVE STACKED UP CHARACTERS). SO SEND HELD
4346 ; UP CHAR FIRST, BECAUSE IT IS CONVENIENT. BECAUSE CONTROL/C IS
4347 ; CONSIDERED BY THE USER TO BE DESTRUCTIVE, HE OR SHE SHOULD NOT BE
4348 ; CONCERNED WITH OUR ABUSE OF THE OUTPUT STREAM FLAGS.
4349 ;
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 13-4
CONTROLLER-DEPENDENT INPUT INTERRUPT CODE
4350
4351 MOV #LEVHSM,MEBUF(R3) ;;;MULTI-ECHO ESCAPE SEQUENCE
4352 BIC #LFCT!FLCT,(R3) ;;;CLEAN UP FIELD FOR "MCR>"
4353
4354 .IIF NE UPND-200, .ERROR UPND
4355
4356 TSTB ATERS(R3) ;;;SOMETHING IN DHBUF?
4357 BMI 7$ ;;;IF MI YES
4358 TST (SP)+ ;;;CLEAN UP STACK
4359 CALLR XITHSM ;;;START SENDING ESCAPE SEQUENCE
4360
4361 .ENDC ;;; DF T$$HLD
4362
4363 .IF DF T$$SYN
4364
4365 .IIF NE UPND-200, .ERROR UPND
4366
4367 9$: TSTB ATERS(R3) ;;;OUTPUT PENDING?
4368 BPL 3$ ;;;IF PL NO
4369 BIS #CCPN,ATERS(R3) ;;;TRY FOR AN MCR PROMPT
4370 BR 7$ ;;;
4371
4372 .ENDC
4373
4374 .DSABL LSB
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 14
CONTROLLER-DEPENDENT POWERFAIL CODE
4376 .SBTTL CONTROLLER-DEPENDENT POWERFAIL CODE
4377
4378 ;+
4379 ; TTPWF - POWERFAIL AND LOADED AS LOADABLE DRIVER ENTRY POINT
4380 ;
4381 ; ENTERED AT FORK LEVEL WITH
4382 ; R5 -> UCB
4383 ; R4 -> SCB
4384 ; R3 = CONTROLLER INDEX
4385 ;-
4386
4387 002422 016402 000000G TTPWF: MOV S.CSR(R4),R2 ;GET ADDRESS OF CSR
4388
4389 .IF DF D$$H11!D$$J11!D$$Z11
4390
4391 MOV U.CW2(R5),R0 ;MULTIPLEXED TERMINAL?
4392
4393 .IF DF D$$L11
4394
4395 ; NEXT INSTRUCTION DEPENDS ON U2.DH1=100000
4396
4397 BPL 20$ ;IF PL NO
4398
4399 .ENDC
4400
4401 MOVB U.UNIT(R5),R1 ;GET PHYSICAL UNIT NUMBER
4402
4403 .IF DF D$$H11
4404
4405 ASL R0 ;DJ11 TERMINAL?
4406
4407 .IF DF D$$J11
4408
4409 ; NEXT INSTRUCTION DEPENDS ON U2.DJ1=U2.DH1/2
4410
4411 BMI 15$ ;IF MI YES
4412
4413 .ENDC
4414
4415 .IF DF D$$Z11
4416
4417 ; NEXT INSTRUCTION DEPENDS ON U2.DZ1=100
4418
4419 TSTB R0 ;DZ11 TERMINAL?
4420 BMI 18$ ;IF MI YES
4421
4422 .ENDC
4423
4424 TST R1 ;LINE ZERO?
4425 BNE 5$ ;IF NE NO
4426 MOV #4000,(R2) ;CLEAR SILO, UARTS, AND DH11 CONTROLLER
4427 MOV #20100,(R2) ;ENABLE INTERRUPTS
4428 5$: MOV R2,DHCSR(R3) ;SAVE ADDRESS OF DH11 CSR
4429 MTPS S.PRI(R4) ;;;LOCK OUT DEVICE INTERRUPTS
4430 BIC #1077,(R2) ;;;CLEAR CURRENT UNIT
4431 BIS R1,(R2) ;;;SELECT DESIRED UNIT
4432 MOV U.CW3(R5),4(R2) ;;;SET UNIT PARAMETERS
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 14-1
CONTROLLER-DEPENDENT POWERFAIL CODE
4433 ASL R1 ;;;CONVERT UNIT TO WORD INDEX
4434 ADD DHTBL(R3),R1 ;;;CALCULATE ADDRESS TO STORE UCB ADDRESS
4435 MOV R5,(R1) ;;;SAVE ADDRESS OF UCB
4436 BICB #US.CRW!US.DSB,U.STS(R5) ;;;ASSUME LOCAL UNIT
4437
4438 .IF DF D$$M11
4439
4440 ; NEXT INSTRUCTION DEPENDS ON U2.RMT=U2.DJ1/2
4441
4442 ASL R0 ;;;LOCAL UNIT?
4443 BPL 14$ ;;;IF PL YES
4444 MOV U.CNT+2+DMCSR(R5),R1 ;;;GET ADDRESS OF DM11-BB CSR
4445 MOV @#4,-(SP) ;;;SAVE ADDRESS OF TRAP PC
4446 MOV #13$,@#4 ;;;CHANGE SO TRAP WILL COME TO US
4447 TST (R1) ;;;LIED ABOUT EXISTENCE OF DM11?
4448 MOV (SP)+,@#4 ;;;RESTORE SYSTEM TRAP 4 PC
4449 BCS 35$ ;;;IF CS YES (13$ LOWERED
4450 ;;; PRIORITY AND SET C)
4451 MOV R1,DMTBL(R3) ;;;SAVE ADDRESS OF DM11-BB CSR
4452 CALL DMHUP ;;;HANG UP UNIT IF NOT READY
4453 MTPS #0 ;;;ALLOW DEVICE INTERRUPTS
4454
4455 .IF DF L$$DRV&LD$TT
4456
4457 MOV CLKSW,R0 ;CLOCK QUEUE ENTRY ALREADY MADE?
4458 BNE 35$ ;IF NE YES
4459 MOV R4,R0 ;POINT AT CLOCK QUEUE ENTRY
4460 ADD #S.DHCK,R0 ;
4461 MOV #DMTMO,12(R0) ;INSERT SUBROUTINE ENTRY POINT
4462 MOV R0,CLKSW ;SAVE POINTER TO CLOCK QUEUE ENTRY
4463
4464 .IFF
4465
4466 MOV #CLKSW,R0 ;POINT TO CLOCK SWITCH WORD
4467 TST (R0) ;CLOCK QUEUE ENTRY ALREADY MADE?
4468 BNE 35$ ;IF NE YES
4469 MOV PC,(R0)+ ;INDICATE CLOCK QUEUE ENTRY MADE
4470
4471 .ENDC
4472
4473 CALLR DMCLK ;INSERT ENTRY IN CLOCK QUEUE
4474
4475 ;
4476 ; CONTROL GOES TO 13$ IF CSR OF DM11 IS NOT IN PRESENT ADDRESS SPACE
4477 ;
4478
4479 13$: MOVB #1,2(SP) ;;;LOWER PRIORITY TO ZERO, SET C
4480 ;;; AND DEVESTATE T BIT
4481 RTI ;;;BACK TO DH POWERFAIL
4482
4483 .ENDC ;;; DF D$$M11
4484
4485 14$: MTPS #0 ;;;ALLOW DEVICE INTERRUPTS
4486 ; EB055
4487 .IF DF D$$J11!D$$Z11!D$$L11 ; EB055
4488 ; EB055
4489 BR 35$ ;;;
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 14-2
CONTROLLER-DEPENDENT POWERFAIL CODE
4490 ; EB055
4491 .ENDC ; EB055
4492
4493 .IFF ; DF D$$H11
4494
4495 .IF DF D$$J11&D$$Z11
4496
4497 ASL R0 ;DZ11 TERMINAL?
4498 BPL 18$ ;IF PL YES
4499
4500 .ENDC
4501
4502 .ENDC ; DF D$$H11
4503
4504 .IF DF D$$J11
4505
4506 15$: MOV R2,DJCSR(R3) ;SAVE ADDRESS OF DJ11 CSR
4507 ASL R1 ;CONVERT UNIT TO WORD INDEX
4508 BNE 17$ ;IF NE NOT LINE ZERO
4509 MOV #10,(R2) ;CLEAR SILO, UARTS, AND DJ11 CONTROLLER
4510 16$: BIT #20,(R2) ;CLR COMPLETED?
4511 BNE 16$ ;IF NE NO
4512 BIS #40501,(R2) ;ENABLE INTERRUPTS
4513 17$: ADD DJTBL(R3),R1 ;CALCULATE ADDRESS TO STORE UCB
4514
4515 .IF DF D$$Z11
4516
4517 .IF NDF D$$ZMD
4518
4519 BR 192$ ;EXIT COMMONLY
4520
4521 .IFF
4522
4523 MOV R5,(R1) ;SAVE ADDRESS OF UCB
4524 BR 35$ ;
4525
4526 .ENDC
4527
4528 .IFF ; DF D$$Z11
4529
4530 MOV R5,(R1) ;SAVE ADDRESS OF UCB
4531
4532 .IF DF D$$H11!D$$L11
4533
4534 BR 35$ ;
4535
4536 .ENDC
4537
4538 .ENDC ; DF D$$Z11
4539
4540 .ENDC ; DF D$$J11
4541
4542 .IF DF D$$Z11
4543
4544 18$: MOV R2,DZCSR(R3) ;SAVE ADDR OF DZ11 CSR
4545 ASL R1 ;CONVERT UNIT # TO WORD INDEX
4546 BNE 191$ ;IF NE NOT FIRST UNIT
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 14-3
CONTROLLER-DEPENDENT POWERFAIL CODE
4547 MOV #20,(R2) ;CLR SILO, UARTS, AND CONTROLLER
4548 19$: BIT #20,(R2) ;CLR DONE YET?
4549 BNE 19$ ;IF NE NO
4550 BIS #40140,(R2) ;ENABLE INTERRUPTS
4551 191$: ADD DZTBL(R3),R1 ;FORM ADDR TO STORE UCB
4552 MOV U.CW3(R5),2(R2) ;SET INITIAL CHARACTERISTICS
4553 192$: MOV R5,(R1) ;SAVE ADDRESS OF UCB
4554
4555 .IF DF D$$ZMD
4556
4557 .IF DF L$$DRV&LD$TT
4558
4559 MOV DZCLKS,R0 ;CLOCK QUEUE ENTRY ALREADY MADE?
4560 BNE 35$ ;IF NE YES
4561 MOV R4,R0 ;POINT AT CLOCK QUEUE ENTRY
4562 ADD #S.DZCK,R0 ;
4563 MOV #DZTMO,12(R0) ;INSERT SUBROUTINE ADDRESS
4564 MOV R0,DZCLKS ;SAVE POINTER TO CLOCK QUEUE ENTRY
4565
4566 .IFF
4567
4568 MOV #DZCLKS,R0 ;POINT AT CLOCK SWITCH WORD
4569 TST (R0) ;CLOCK ENTRY ALREADY QUEUED?
4570 BNE 35$ ;IF NE YES
4571 MOV PC,(R0)+ ;MARK ENTRY AS QUEUED
4572
4573 .ENDC
4574
4575 CALLR DZCLK ;INSERT ENTRY IN CLOCK QUEUE
4576
4577 .IFF
4578
4579 .IF DF D$$L11 ; EB055
4580
4581 BR 35$ ;
4582
4583 .ENDC
4584
4585 .ENDC ; DF D$$ZMD
4586
4587 .ENDC ; DF D$$Z11
4588
4589 .ENDC ; DF D$$H11!D$$J11!D$$Z11
4590
4591 .IF DF D$$L11
4592
4593 002426 010563 002252' 20$: MOV R5,CNTBL(R3) ;SAVE ADDRESS OF UCB
4594 002432 116200 000002 MOVB 2(R2),R0 ;CLEAR DL11 INPUT DATA BUFFER REGISTER
4595 002436 052712 000100 BIS #100,(R2) ;ENABLE RECEIVER INTERRUPTS
4596
4597 .ENDC
4598
4599 002442 35$: RETURN
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 15
MISCELLANEOUS CONTROLLER-DEPENDENT SUBROUTINES
4601 .SBTTL MISCELLANEOUS CONTROLLER-DEPENDENT SUBROUTINES
4602
4603 .ENABL LSB
4604
4605 ;
4606 ; DH11 TERMINAL MULTIPLEXER SAVE ROUTINE
4607 ;
4608
4609 .IF DF D$$H11
4610
4611 DHSAV: TTSET$ DH,D$$H11,MUX ;;;SAVE R3
4612 ;;; SET R3=ADDR OF UCB TABLE
4613 ;;; SET R4=CSR OF INTERRUPTER
4614
4615 .IF DF D$$Z11!D$$J11!D$$L11
4616
4617 BR 20$ ;;;FINISH IN COMMON CODE
4618
4619 .ENDC
4620
4621 .ENDC ;;; DF D$$H11
4622
4623 ;
4624 ; DZ11 TERMINAL MULTIPLEXER SAVE ROUTINE
4625 ;
4626
4627 .IF DF D$$Z11
4628
4629 DZSAV: TTSET$ DZ,D$$Z11,MUX ;;;SAVE R3
4630 ;;; SET R3=ADDR OF UCB TABLE
4631 ;;; SET R4=CSR OF INTERRUPTER
4632
4633 .IF DF D$$J11!D$$L11
4634
4635 BR 20$ ;;;FINISH IN COMMON CODE
4636
4637 .ENDC
4638
4639 .ENDC ;;; DF D$$Z11
4640
4641 ;
4642 ; DJ11 TERMINAL MULTIPLEXER SAVE ROUTINE
4643 ;
4644
4645 .IF DF D$$J11
4646
4647 DJSAV: TTSET$ DJ,D$$J11,MUX ;;;SAVE R3
4648 ;;; SET R3=ADDR OF UCB TABLE
4649 ;;; SET R4=CSR OF INTERRUPTER
4650
4651 .IF DF D$$L11
4652
4653 BR 20$ ;;;FINISH IN COMMON CODE
4654
4655 .ENDC
4656
4657 .ENDC ;;; DF D$$J11
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 15-1
MISCELLANEOUS CONTROLLER-DEPENDENT SUBROUTINES
4658
4659 ;
4660 ; DL11 TERMINAL SAVE ROUTINE
4661 ;
4662
4663 .IF DF D$$L11
4664
4665 002444 DLSAV: TTSET$ DL,D$$L11 ;;;SAVE R3
4666 ;;; SET R5=ADDR OF UCB
4667 002452 016504 000000G MOV U.SCB(R5),R4 ;;;RETRIEVE ADDRESS OF SCB
4668 002456 010503 MOV R5,R3 ;;;CALCULATE ADDRESS OF TERMINAL
4669 002460 062703 000002G ADD #U.CNT+2+STATS,R3 ;;; CONTROL BLOCK
4670
4671 .ENDC
4672
4673 002464 20$: CALL @(SP)+ ;;;CALL THE CALLER BACK
4674 002466 012603 MOV (SP)+,R3 ;;;RESTORE R3
4675 002470 RETURN ;;;EXIT FROM INTERRUPT
4676
4677 .DSABL LSB
4678
4679 ;+
4680 ; **-$DM11B-DM11-BB MODEM CONTROL MULTIPLEXER INTERRUPTS
4681 ;-
4682
4683 .IF DF D$$M11
4684
4685 $DM11B:: ;;;REF LABEL
4686
4687 .IF NDF L$$DRV!M$$MGE!LD$TT
4688
4689 .IF GT D$$M11-1
4690
4691 MFPS DHTMP ;;;SAVE CONTROLLER NUMBER
4692
4693 .IFTF
4694
4695 CALL $INTSV,PR5 ;;;SAVE REGISTERS AND SET PRIORITY
4696 MOV R3,-(SP) ;;;SAVE R3 AND R2
4697 MOV R2,-(SP) ;;;
4698
4699 .IFT
4700
4701 MOV DHTMP,R3 ;;;RETRIEVE SAVED PS WORD
4702 BIC #177760,R3 ;;;CLEAR ALL BUT CONTROLLER NUMBER
4703 ASL R3 ;;;CONVERT TO WORD INDEX
4704
4705 .IFF
4706
4707 CLR R3 ;;;SET CONTROLLER NUMBER TO ZERO
4708
4709 .ENDC
4710
4711 .IFF ;;; NDF L$$DRV!M$$MGE!LD$TT
4712
4713 MOV R3,-(SP) ;;;SAVE R3 AND R2
4714 MOV R2,-(SP) ;;;
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 15-2
MISCELLANEOUS CONTROLLER-DEPENDENT SUBROUTINES
4715
4716 .IF GT D$$M11-1
4717
4718 MOV R4,R3 ;;;EXEC INTERRUPT ROUTINES PUT
4719 ;;; CONTROLLER NUMBER IN R4
4720
4721 .IFF
4722
4723 CLR R3 ;;;SET CONTROLLER NUMBER TO ZERO
4724
4725 .ENDC
4726
4727 .ENDC ;;; NDF L$$DRV!M$$MGE!LD$TT
4728
4729 MOV DMTBL(R3),R4 ;;;GET ADDRESS OF DM11-BB CSR
4730 BEQ 50$ ;;;IF EQ SPURIOUS INTERRUPT
4731 MOV (R4)+,R5 ;;;GET INTERRUPT STATUS
4732 MOV R5,-(SP) ;;;SAVE INTERRUPT STATUS
4733 BIC #177760,R5 ;;;CLEAR ALL BUT UNIT NUMBER
4734 ASL R5 ;;;CONVERT UNIT NUMBER TO WORD INDEX
4735 ADD DHTBL(R3),R5 ;;;CALCULATE ADDRESS OF UCB ADDRESS
4736 MOV (R5),R5 ;;;GET ADDRESS OF UCB
4737 BNE 4$ ;;;IF NE CORRESPONDING DH11 UCB EXISTS ; EB055
4738 TST (SP)+ ;;;REMOVE INTERRUPT STATUS FROM STACK ; EB055
4739 BR 50$ ;;;IGNORE INTERRUPT ; EB055
4740 4$: BIS #7,(R4) ;;;SET REQUEST SEND+DATA ENABLE+ ; EB055
4741 ;;; RING ENABLE ; EB055
4742 MOV (R4),R2 ;;;GET UNIT STATUS
4743 COM R2 ;;;COMPLEMENT UNIT STATUS
4744 BIC #1200,-(R4) ;;;REENABLE SCANNING
4745 ASL (SP)+ ;;;RING, CARRIER, OR CLEAR TO SEND TRANSITION?
4746 BCS 10$ ;;;IF CS RING
4747
4748 ;
4749 ; CARRIER OR CLEAR TO SEND TRANSITION
4750 ;
4751
4752 MOVB #2,U.CNT+2+DMTIM(R5) ;;;ASSUME CARRIER OR CLR TO SEND NOT SET
4753 BIT #140,R2 ;;;CARRIER AND CLEAR TO SEND SET?
4754 BNE 40$ ;;;IF NE NO
4755 BITB #US.DSB,U.STS(R5) ;;;UNIT DISABLED?
4756 BEQ 30$ ;;;IF EQ NO
4757 BR 20$ ;;;FINISH IN COMMON CODE
4758
4759 ;
4760 ; RING TRANSITION
4761 ;
4762
4763 10$: MOVB #7,U.CNT+2+DMTIM(R5) ;;;ASSUME CARRIER OR CLR TO SEND NOT SET
4764 BIT #140,R2 ;;;CARRIER AND CLEAR TO SEND SET?
4765 BNE 40$ ;;;IF NE NO
4766 20$: BICB #US.DSB,U.STS(R5) ;;;ENABLE UNIT
4767 MOV DHCSR(R3),R4 ;;;GET ADDRESS OF DH11 CSR
4768 BIC #1077,(R4) ;;;CLEAR CURRENT UNIT
4769 BISB U.UNIT(R5),(R4) ;;;SELECT DESIRED UNIT
4770 MOV #T$$MAN,4(R4) ;;;START ALL REMOTE LINES THE SAME
4771 BIC #U2.CRT!U2.ESC!U2.HLD!U2.L3S!U2.VT5!U2.LWC,U.CW2(R5) ;;;
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 15-3
MISCELLANEOUS CONTROLLER-DEPENDENT SUBROUTINES
4772 MOV #T$$MAN,U.CW3(R5) ;;;REMEMBER NEW LINE CHARACTERISTICS
4773 MOV #72.,U.CW4(R5) ;;;SET INITIAL BUFFER SIZE ; EB069
4774 30$: BICB #US.CRW,U.STS(R5) ;;;CLEAR CARRIER WAIT
4775 BR 50$ ;;;
4776 40$: BISB #US.CRW,U.STS(R5) ;;;SET CARRIER WAIT
4777 50$: MOV (SP)+,R2 ;;;RESTORE R2 AND R3
4778 MOV (SP)+,R3 ;;;
4779 RETURN ;;;EXIT FROM INTERRUPT
4780
4781 ;
4782 ; SUBROUTINE TO HANG UP A DM11-BB UNIT IF NOT READY
4783 ; ; EB055
4784 ; INPUTS: ; EB055
4785 ; ; EB055
4786 ; R1=CSR ADDR OF DM11-BB ; EB055
4787 ; R5=UCB ADDR ; EB055
4788 ; ; EB055
4789 ; OUTPUTS: ; EB055
4790 ; ; EB055
4791 ; NO REGISTERS ARE DESTROYED ; EB055
4792 ; UCB AND DM11-BB STATUSES ARE MODIFIED ; EB055
4793 ;
4794
4795 DMHUP: BICB #US.CRW!US.DSB,U.STS(R5) ;;;CLEAR CARRIER WAIT AND ENABLE UNIT
4796 BIC #1040,(R1) ;;;DISABLE SCAN
4797 10$: BIT #20,(R1) ;;;SCAN STOPPED?
4798 BNE 10$ ;;;IF NE NO
4799 MOV (R1),-(SP) ;;;CANNOT USE BYTE INSTRUCTIONS
4800 ;;; ON DM11-BB (UNDOCUMENTED)
4801 BIC #1017,(SP) ;;;CLEAR CURRENT UNIT
4802 BISB U.UNIT(R5),(SP) ;;;SET DESIRED UNIT
4803 MOV (SP)+,(R1)+ ;;;TELL DM11-BB ABOUT IT
4804 BIS #7,(R1) ;;;SET REQUEST SEND+DATA ENABLE+RING ENABLE
4805 MOV (R1),-(SP) ;;;GET CURRENT UNIT STATUS
4806 COM (SP) ;;;COMPLEMENT UNIT STATUS
4807 BIT #140,(SP)+ ;;;CARRIER AND CLEAR TO SEND SET?
4808 BEQ 20$ ;;;IF EQ YES
4809 BISB #US.DSB,U.STS(R5) ;;;DISABLE UNIT
4810 BIC #17,(R1) ;;;CLEAR CURRENT UNIT STATUS
4811 INC (R1) ;;;ENABLE RING INTERRUPT
4812 CLC ;;;INDICATE UNIT HUNG UP
4813 20$: BIS #140,-(R1) ;;;RESTART SCAN AND ENABLE INTERRUPT
4814 RETURN ;;;
4815
4816 ;
4817 ; DMTMO - DM11-BB TIME OUT ROUTINE
4818 ;
4819 ; THIS ROUTINE IS ENTERED EVERY 4 SECONDS FROM THE TIME DEPENDENT SCHEDULER
4820 ; TO CHECK FOR DM11-BB TIMEOUTS.
4821 ;
4822 ; INPUTS:
4823 ;
4824 ; NONE ; EB055
4825 ;
4826 ; OUTPUTS:
4827 ;
4828 ; ALL DM11-BB UNITS ARE EXAMINED FOR TIMEOUT. IF A TIMEOUT OCCURS,
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 15-4
MISCELLANEOUS CONTROLLER-DEPENDENT SUBROUTINES
4829 ; THEN THE UNIT IS HUNG UP.
4830 ;
4831
4832 DMTMO: MOV #D$$M11,R0 ;SET NUMBER OF DM11-BB'S
4833 CLR R3 ;CLEAR CONTROLLER INDEX
4834 10$: MOV DHTBL(R3),R2 ;GET ADDRESS OF UCB TABLE
4835 20$: MTPS #0 ;ALLOW DEVICE INTERRUTPS
4836 MOV (R2)+,R5 ;GET ADDRESS OF NEXT UCB
4837 BEQ 30$ ;IF EQ END OF LIST
4838 BITB #US.OFL,U.ST2(R5) ;IS THE LINE OFFLINE? ; EB012
4839 BNE 30$ ;IF NE YES -- OTHERS ARE ALSO ; EB012
4840 MOV U.SCB(R5),R4 ;GET ADDRESS OF SCB
4841 MTPS S.PRI(R4) ;;;LOCK OUT DEVICE INTERRUPTS
4842 BITB #US.CRW,U.STS(R5) ;;;WAITING FOR CARRIER?
4843 BEQ 20$ ;;;IF EQ NO
4844 DECB U.CNT+2+DMTIM(R5) ;;;ANY TIME REMAINING?
4845 BNE 20$ ;;;IF NE YES
4846 MOV DMTBL(R3),R1 ;;;GET ADDRESS OF DM11-BB CSR
4847 CALL DMHUP ;;;HANG UP UNIT
4848 BCS 20$ ;;;IF CS UNIT NOT HUNG UP
4849 CALL TTHUP ;;;DO SPECIAL I/O CANCEL FOR HANGUP
4850 BR 20$ ;;;
4851 30$: TST (R3)+ ;ADVANCE CONTROLLER INDEX
4852 DEC R0 ;ANY MORE DM11-BB'S?
4853 BGT 10$ ;IF GT YES
4854
4855 .IF DF L$$DRV&LD$TT
4856
4857 MOV CLKSW,R0 ;POINT AT CLOCK QUEUE CONTROL BLOCK
4858
4859 .IFF
4860
4861 MOV #CLKSW+2,R0 ;GET ADDRESS OF CLOCK QUEUE CONTROL BLOCK
4862
4863 .ENDC
4864
4865 DMCLK: CLR R1 ;ZERO HIGH ORDER DELTA TIME
4866 MOV $TKPS,R2 ;GET CLOCK TICKS PER SECOND
4867 ASL R2 ;CONVERT TO 4 SECOND INTERVAL
4868 ASL R2 ;
4869 INSCLK: MOV #C.SYST,R4 ;SET TYPE TO SYSTEM SUBROUTINE
4870 CALLR $CLINS ;INSERT ENTRY IN CLOCK QUEUE
4871
4872 .ENDC ; DF D$$M11
4873
4874 .IF DF D$$ZMD
4875
4876 ;+
4877 ; DZTMO - DZ11 TIME OUT ROUTINE
4878 ;
4879 ; THIS ROUTINE IS ENTERED EVERY HALF SECOND TO CHECK FOR ANY
4880 ; CHANGE IN CARRIER STATUS ON ANY DZ11 REMOTE LINE.
4881 ;
4882 ; INPUTS:
4883 ;
4884 ; NONE
4885 ;
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 15-5
MISCELLANEOUS CONTROLLER-DEPENDENT SUBROUTINES
4886 ; OUTPUTS:
4887 ;
4888 ; DESTROYS R0, R1, R2, R3, R4, R5
4889 ;
4890 ; IF A REMOTE ENABLED LINE LOSES CARRIER, IT IS HUNG UP. IF
4891 ; A REMOTE, DISABLED LINE ASSERTS CARRIER, IT IS ENABLED ON THE
4892 ; ASSUMPTION THAT IT HAS RUNG AND HAS BEEN ANSWERED. ANSWERING
4893 ; IS AUTOMATIC FOR LINES THAT HAVE DATA TERMINAL READY ASSERTED,
4894 ; AND LINE HANG UP IS AUTOMATIC WHEN DTR IS DEASSERTED.
4895 ; DISABLED IS A LOGICAL STATUS WHERE TTDRV IGNORES ANY INPUT
4896 ; FROM THE LINE AND REJECTS ANY OUTPUT TO IT.
4897 ;-
4898
4899 DZTMO: MOV #D$$Z11,R0 ;SAVE NUMBER OF DZ11'S IN SYSTEM
4900 CLR R3 ;START AT MULTIPLEXER ZERO
4901 10$: MOV DZTBL(R3),R2 ;GET ADDRESS OF UCB'S FOR THIS MUX
4902 MOV DZCSR(R3),R1 ;GET CSR ADDRESS FOR MULTIPLEXER
4903 20$: MOV (R2)+,R5 ;GET UCB ADDRESS FOR NEXT LINE ON MUX
4904 BEQ 30$ ;IF EQ NO MORE LINES TO EXAMINE
4905 BIT #U2.RMT,U.CW2(R5) ;THIS A REMOTE LINE?
4906 BEQ 20$ ;IF EQ NO
4907 BITB #US.OFL,U.ST2(R5) ;IS THE LINE OFFLINE? ; EB012
4908 BNE 30$ ;IF NE YES -- OTHER UNITS ARE ALSO ; EB012
4909 MOVB U.UNIT(R5),R4 ;GET LINE NUMBER
4910 ASL R4 ;CONVERT TO WORD INDEX
4911 MOV $BTMSK(R4),R4 ;IN R4, ASSERT BIT N FOR UNIT N ; EB012
4912 BISB R4,5(R1) ;ENABLE DTR FOR THIS LINE ; EB012
4913 BITB R4,7(R1) ;CARRIER ASSERTED? ; EB012
4914 BEQ 25$ ;IF EQ NO
4915 BITB #US.DSB,U.STS(R5) ;UNIT HUNGUP?
4916 BEQ 20$ ;IF EQ NO
4917 MOV #T$$ZAN,-(SP) ;GET ANSWER LINE CHARACTERISTICS
4918 BISB U.UNIT(R5),(SP) ;MAKE THEM FOR THIS LINE
4919 MOV (SP),2(R1) ;PUT THEM INTO EFFECT
4920 MOV (SP)+,U.CW3(R5) ;SAVE THEM FOR MCR AND POWERFAIL
4921 BIC #U2.CRT!U2.ESC!U2.HLD!U2.L3S!U2.VT5!U2.LWC,U.CW2(R5) ;
4922 MOV #72.,U.CW4(R5) ;START LINE IN A KNOWN STATE ; EB069
4923 23$: BICB #US.DSB,U.STS(R5) ;ENABLE LINE (LOGICALLY ANSWER)
4924 BR 20$ ;
4925 25$: BITB #US.DSB,U.STS(R5) ;ALREADY HUNG UP?
4926 BNE 20$ ;IF NE YES
4927 BICB R4,5(R1) ;LOWER DTR TO HANG UP ; EB012
4928 MOV U.SCB(R5),R4 ;TTHUP MAY NEED SCB ADDRESS
4929 CALL TTHUP ;LOG OUT USER IF NECESSARY
4930 BCS 20$ ;IF CS TRY TO SAY BYE LATER
4931 BISB #US.DSB,U.STS(R5) ;DISABLE LINE (LOGICALLY HANGUP)
4932 BR 20$ ;
4933 30$: TST (R3)+ ;INDEX TO NEXT MULTIPLEXER
4934 DEC R0 ;LOOKED AT THEM ALL?
4935 BGT 10$ ;IF GT NO
4936
4937 .IF DF L$$DRV&LD$TT
4938
4939 MOV DZCLKS,R0 ;POINT AT CLOCK QUEUE ENTRY
4940
4941 .IFF
4942
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 15-6
MISCELLANEOUS CONTROLLER-DEPENDENT SUBROUTINES
4943 MOV #DZCLKS+2,R0 ;REINSERT CLOCK ENTRY
4944
4945 .ENDC
4946
4947 DZCLK: CLR R1 ;ZERO HIGH ORDER DELTA TIME
4948 MOV $TKPS,R2 ;GET CLOCK TICKS PER SECOND
4949 ASR R2 ;WANT A HALF SECOND INTERVAL
4950
4951 .IF DF D$$M11
4952
4953 BR INSCLK ;INSERT ENTRY INTO CLOCK QUEUE
4954
4955 .IFF
4956
4957 MOV #C.SYST,R4 ;SET TYPE TO SYSTEM SUBROUTINE
4958 CALLR $CLINS ;INSERT ENTRY IN CLOCK QUEUE
4959
4960 .ENDC
4961
4962 .ENDC ; DF D$$ZMD
4963
4964 000001 .END
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 15-7
SYMBOL TABLE
AS.DEL= 000010 FLBYT = 000011 JTTINI 001162R P.NAM 000004 S.1200= 000013
AS.EXT= 000004 FLCT = 000017 KISAR6= ****** GX P.OWN 000026 S.134 = 000006
AS.RED= 000001 FNBYT = 000005 K$$CNT= 177546 P.PRI 000002 S.150 = 000007
AS.WRT= 000002 FWRITE 000300R K$$CSR= 177546 P.REL 000014 S.1800= 000014
ATERS = 000024 F$$LVL= 000001 K$$LDC= 000000 P.SIZE 000016 S.200 = 000010
A$$CHK= 000000 F1.ACR= 000001 K$$TPS= 000074 P.STAT 000030 S.2000= 000015
A$$CPS= 000000 F1.BTW= 000002 LD$LP = 000000 P.SUB 000010 S.2400= 000016
A$$PRI= 000000 F1.BUF= 000004 LD$TT = 000000 P.SWSZ 000022 S.300 = 000011
A$$TRP= 000000 F1.CCO= 000020 LFBT = 004000 P.TCB 000026 S.3600= 000017
A.IOC 000003 F1.ESQ= 000040 LFCT = 074000 P.WAIT 000020 S.4800= 000020
A.LGTH= 000014 F1.HLD= 000100 L$$ASG= 000000 Q$$OPT= 000010 S.50 = 000002
A.MPCT 000011 F1.LWC= 000200 L$$DRV= 000000 RESUME 001364R S.600 = 000012
A.PCB 000012 F1.RNE= 000400 L$$P11= 000001 RMBYT = 000004 S.7200= 000021
A.PCBL 000000 F1.RPR= 001000 L$$11R= 000000 RPRM = 100000 S.75 = 000003
A.PRI 000002 F1.RST= 002000 MBUFR = 000014 RUBP = 000020 S.9600= 000022
A.STAT 000010 F1.RUB= 004000 MBUF0 = 000017 R$$DER= 000000 TC.ACR= 000024
A.TCB 000004 F1.SYN= 010000 MCTR = 000004 R$$K11= 000001 TC.ALT= 000031
A.TCBL 000006 F1.TRW= 020000 MEBUF = 000012 R$$SND= 000000 TC.BLK= 000042
BAKS = 004000 F1.UIA= 000010 MECHO1 001664R R$$11M= 000000 TC.BSP= 000023
BECHOB 000454R F1.UTB= 040000 MODE = 100000 SE.BIN= 000003 TC.CCF= 000030
BTTINI 000244R F1.VBF= 100000 M$$CRB= 000124 SE.FIX= 000002 TC.CEQ= 000046
BTWP = 020000 F2.ALT= 000020 M$$CRI= 000120 SE.ICN= 000001 TC.DLU= 000041
BTWQ = 040000 F2.DCH= 000004 M$$CRX= 000000 SE.LPR= 000011 TC.EPA= 000040
CCAST = 000026 F2.DKL= 000010 M$$FCS= 000000 SE.NIH= 000014 TC.ESQ= 000035
CCON = 000010 F2.GCH= 000002 M$$MGE= 000000 SE.NSC= 000012 TC.FRM= 000043
CCPN = 010000 F2.SCH= 000001 M$$OVR= 000000 SE.PAR= 000010 TC.HFF= 000017
CHAR = 000100 F2.SFF= 000040 NCKP = 000002 SE.SPD= 000006 TC.HFL= 000013
CNTBL 002252R GETBF 002174R NEXTB = 000030 SE.SPL= 000007 TC.HHT= 000021
CRJT = 001000 GETBF2 002200R N$$LDV= 000001 SE.TER= 000005 TC.HLD= 000044
CRTY = 002000 G$$TPP= 000000 N$$MOV= 000010 SE.UPN= 000013 TC.IMG= 000032
CTLO = 000040 G$$TSS= 000000 N$$SYS= 000001 SE.VAL= 000004 TC.ISL= 000006
CTRLC 000000R G$$TTK= 000000 N$$USR= 000001 SF.DEF= 000010 TC.LCP= 000036
CTRLU 000007R G$$WRD= 000000 OCHAR 002336R SF.GAC= 002600 TC.LPP= 000002
CTRLZ 000014R HORPS = 000010 OUTPT 000404R SF.GMC= 002560 TC.LVF= 000020
CURBF = 000006 ICHAR 001346R OUTPT1 000404R SF.GSC= 002540 TC.MAX= 000064
C$$CKP= 000000 IE.ABO= ****** GX PS = ****** GX SF.RDF= 002460 TC.NEC= 000047
C$$ORE= 000400 IE.EOF= ****** GX PS.APR= 000007 SF.SAC= 002620 TC.NKB= 000033
C$$RSH= 177564 IE.NOD= ****** GX PS.CHK= 010000 SF.SMC= 002440 TC.NL = 000015
DFUIC = 000020 IE.SPC= ****** GX PS.CKP= 040000 SF.SSC= 002420 TC.NPR= 000034
DHBUF = 000022 IHORP = 000023 PS.CKR= 020000 SF.STS= 002520 TC.NST= 000022
DLSAV 002444R INPINI 002210R PS.COM= 000200 SF.STT= 002500 TC.PAR= 000037
DOCTLC 001356R INPPT 000620R PS.DEL= 000010 SOLI = 000100 TC.PRI= 000051
D$$BUG= 177514 INPRQ = 000016 PS.DRV= 000020 STATS = 000000 TC.RAT= 000007
D$$ISK= 000000 INPT0 000626R PS.FXD= 004000 STRBF = 000002 TC.RSP= 000003
D$$L11= 000001 INPT1 001110R PS.LIO= 001000 S$$WRG= 000000 TC.SCP= 000012
D$$YNC= 000000 INPT2 001114R PS.NSF= 000400 S$$YSZ= 007600 TC.SCR= 000011
D$$YNM= 000000 IODON 000612R PS.OUT= 100000 S.CSR = ****** GX TC.SFF= 000016
ECHO = 001000 IO.ATT= ****** GX PS.PER= 002000 S.CTM = ****** GX TC.SLV= 000050
ECHOB 000644R IO.DET= ****** GX PS.PIC= 000100 S.EXTA= 000023 TC.SMO= 000027
ECHOB1 001104R IO.RLB= ****** GX PS.SYS= 000040 S.EXTB= 000024 TC.SMP= 000026
EOLS = 000400 IO.WLB= ****** GX P$$P45= 000000 S.ITM = ****** GX TC.SMR= 000025
ESCS = 000020 IS.SUC= ****** GX P$$WRD= 000000 S.PKT = ****** GX TC.STB= 000005
E$$XPR= 000000 I$$RAR= 000000 P.BLKS 000016 S.PRI = ****** GX TC.TAP= 000045
FCHAR 002336R I$$RDN= 000000 P.BUSY 000024 S.STS = ****** GX TC.TTP= 000010
FILTB 000021R I.FCN = ****** GX P.IOC 000003 S.0 = 000001 TC.UC0= 000052
FKCR = 002000 I.PRM = ****** GX P.LNK 000000 S.100 = 000004 TC.UC1= 000053
FLBT = 000001 I.TCB = ****** GX P.MAIN 000012 S.110 = 000005 TC.UC2= 000054
TTDRV MACRO M1110 13-OCT-79 13:18 PAGE 15-8
SYMBOL TABLE
TC.UC3= 000055 TF.SYN= 000200 T.KS33= 000002 UIFP = 000200 XOFF = 000400
TC.UC4= 000056 TF.TMO= 000200 T.LA36= 000006 UOFF = 000001 X$$DBT= 000000
TC.UC5= 000057 TF.WAL= 000010 T.L180= 000014 UPND = 000200 $ALOCB= ****** GX
TC.UC6= 000060 TF.WBT= 000100 T.L30P= 000005 US.BSY= ****** GX $DEACB= ****** GX
TC.UC7= 000061 TF.WMS= 000020 T.L30S= 000004 US.ECH= ****** GX $DLINP 002372RG
TC.UC8= 000062 TF.XOF= 000100 T.SCR0= 000015 US.OUT= ****** GX $DLOUT 002264RG
TC.UC9= 000063 TINP1 001470R T.UNK0= 000000 U.ATT = ****** GX $FORK = ****** GX
TC.VFL= 000014 TTCAN 002106R T.USR0= 000016 U.BUF = ****** GX $GTBYT= ****** GX
TC.WID= 000001 TTINI 000110R T.USR1= 000017 U.CNT = ****** GX $GTPKT= ****** GX
TC.XSP= 000004 TTOUT 002320R T.USR2= 000020 U.CW2 = ****** GX $IOALT= ****** GX
TF.AST= 000010 TTOUT1 000530R T.USR3= 000021 U.CW4 = ****** GX $IODON= ****** GX
TF.BIN= 000002 TTPWF 002422R T.USR4= 000022 U.SCB = ****** GX $QASTT= ****** GX
TF.CCO= 000040 T$$CCA= 000000 T.VT05= 000007 U.STS = ****** GX $QMCRL= ****** GX
TF.ESQ= 000020 T$$KMG= 000000 T.VT50= 000010 U2.L3S= ****** GX $TTINP 002372RG
TF.RAL= 000010 T$$MIN= 000000 T.VT52= 000011 U2.VT5= ****** GX $TTOUT 002264RG
TF.RNC= 000040 T$$NCO= 000000 T.VT55= 000012 V$$CTR= 001000 $TTTBL 002254RG
TF.RNE= 000020 T.AS33= 000001 T.VT61= 000013 WESC = 000040 ...GBL= 000000
TF.RST= 000001 T.AS35= 000003 T1 = 000000
. ABS. 000032 000
002472 001
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 5933 WORDS ( 24 PAGES)
DYNAMIC MEMORY: 6892 WORDS ( 26 PAGES)
ELAPSED TIME: 00:01:36
TTDRV,[135,30]TTDRV/CR/-SP=[1,1]EXEMC/ML,[135,20]RSXMCT/PA:1,[135,10]TTDRV
TTDRV CREATED BY MACRO ON 13-OCT-79 AT 13:19 PAGE 1
SYMBOL CROSS REFERENCE CREF
SYMBOL VALUE REFERENCES
ATERS = 000024 #3-301 *4-1000 *4-1251 7-2650 7-2695
A$$CHK = 000000 4-851 4-857
A$$TRP = 000000 3-304 4-990 4-1202 4-1214 4-1247 7-2513 7-2648 7-2670 7-2693
BAKS = 004000 #3-348
BECHOB 000454 R #5-1871
BTTINI 000244 R #4-1341 5-2021
BTWP = 020000 #3-345
BTWQ = 040000 #3-344
CCAST = 000026 #3-305 *4-996 4-998 7-2528
CCON = 000010 #3-362 4-1000 4-1251 7-2650 7-2695
CCPN = 010000 #3-346
CHAR = 000100 #3-357
CNTBL 002252 R #9-3561 *14-4593 15-4665
CRJT = 001000 #3-330 4-1372 5-2126 5-2193 5-2220 7-2717
CRTY = 002000 #3-329 4-1473 4-1524 5-1881 8-3535
CTLO = 000040 #3-334 4-1199 4-1497 5-1866 5-1977 5-2270 8-3535
CTRLC 000000 R #3-546 7-2723
CTRLU 000007 R #3-547 7-3003
CTRLZ 000014 R #3-548 7-3068
CURBF = 000006 #3-287 6-2358 7-2852 *7-2864 7-2875 *7-3007 7-3118 *7-3126 8-3539
C$$CKP = 000000 4-1375 6-2421
DFUIC = 000020 #3-294
DHBUF = 000022 #3-295
DLSAV 002444 R 10-3886 13-4218 #15-4665
DOCTLC 001356 R #7-2576
D$$H11 = ****** 4-1177 9-3575 10-3850 11-3927 12-4042 13-4166 13-4180 13-4279 14-4389
15-4609
D$$J11 = ****** 9-3696 10-3811 10-3831 10-3894 11-3927 12-4042 13-4150 13-4180 13-4279
14-4389 15-4645
D$$L11 = 000001 9-3559 9-3561 10-3883 10-3894 12-4101 13-4214 14-4591 15-4663 15-4665
D$$M11 = ****** 3-240 3-312 4-1177 8-3372 15-4683
D$$YNM = 000000 4-1463
D$$ZMD = ****** 4-1177 8-3372 15-4874
D$$Z11 = ****** 9-3627 10-3777 10-3831 10-3894 11-3927 12-4042 13-4130 13-4180 13-4279
14-4389 15-4627
ECHO = 001000 #3-352
ECHOB 000644 R 5-1871 5-1882 5-1899 5-1929 #5-2068 7-3089
ECHOB1 001104 R 5-2269 #5-2272
EOLS = 000400 #3-331 4-1473 5-1866 5-1880 5-2035 7-3067 7-3078 7-3124 8-3346
8-3355 8-3535
ESCS = 000020 #3-361
FCHAR 002336 R #12-4039
FILTB 000021 R #3-568 5-2143
FKCR = 002000 #3-350
FLBT = 000001 #3-337 5-2054 5-2126 5-2203
FLBYT = 000011 #3-289 5-2057 *5-2101 *5-2207
FLCT = 000017 #3-336 4-1473 5-1825 8-3535
FNBYT = 000005 #3-286 5-1936 *5-1938 5-1983 6-2358 *7-3036 *7-3066 *7-3077 *8-3354
FWRITE 000300 R #4-1486
GETBF 002174 R 4-1325 7-2708 #8-3484
GETBF2 002200 R #8-3494
HORPS = 000010 #3-288 5-2098 5-2130 *5-2156 5-2232 *5-2253
TTDRV CREATED BY MACRO ON 13-OCT-79 AT 13:19 PAGE 2
SYMBOL CROSS REFERENCE CREF
SYMBOL VALUE REFERENCES
ICHAR 001346 R #7-2554 13-4265
IE.ABO = ****** GX 5-1936 8-3354
IE.EOF = ****** GX 7-3066
IE.NOD = ****** GX 4-1330
IE.SPC = ****** GX 4-1002
IHORP = 000023 #3-296 3-297
INPINI 002210 R #8-3517
INPPT 000620 R 5-1860 #5-2035
INPRQ = 000016 #3-292 4-1130 7-2672 *7-2678 7-2689 *7-2690
INPT0 000626 R 4-1453 4-1485 #5-2047 7-2519 7-2624
INPT1 001110 R 5-2043 #6-2328
INPT2 001114 R 5-1965 #6-2349
IODON 000612 R #5-2004
IO.ATT = ****** GX 4-1216
IO.DET = ****** GX 4-1249
IO.RLB = ****** GX 4-1258
IO.WLB = ****** GX 4-1187
IS.SUC = ****** GX 4-1200 5-1890 6-2374
I.FCN = ****** GX 4-1187 4-1216 4-1249 4-1258
I.PRM = ****** GX 4-996 4-1520 5-1976
I.TCB = ****** GX 8-3344
JTTINI 001162 R #6-2365 6-2469 7-2533
KISAR6 = ****** GX 6-2438
LD$TT = 000000 9-3563 10-3886 13-4218
LD$$H = ****** 9-3739 9-3751
LD$$J = ****** 9-3743 9-3751
LD$$L = ****** 9-3735 9-3751
LD$$Z = ****** 9-3747 9-3751
LFBT = 004000 #3-328 4-1543 4-1544 4-1547 5-1897 5-2173 5-2179 7-2719
LFCT = 074000 #3-327 4-1473 5-1827 7-3087 8-3535
L$$DRV = 000000 9-3563 10-3886 13-4218
L$$50H = ****** 5-2197
MBUFR = 000014 #3-291 *7-2991 7-2993
MBUF0 = 000017 #3-293
MCTR = 000004 #3-363
MEBUF = 000012 #3-290 5-1829 *5-1928 *7-2994
MECHO1 001664 R #7-2991 7-3088
MODE = 100000 #3-326 4-1474 5-1857 5-1953 5-2266 7-2748 8-3338 8-3349 8-3535
M$$CRB = 000124 6-2464 8-3484
M$$CRI = 000120 #3-254 8-3528 8-3530
M$$MGE = 000000 4-1463 5-1907 6-2436 7-2866 7-3009 7-3111 8-3508 9-3563 10-3886
13-4218
NCKP = 000002 #3-365
NEXTB = 000030 #3-297 3-301 3-302 #3-302 3-305 3-306 #3-306
NOEXBF = ****** 4-1315 6-2419
OCHAR 002336 R 5-2272 #12-4030
OUTPT 000404 R #5-1777 10-3904
OUTPT1 000404 R 4-1549 #5-1825 5-2112 7-2995
PS = ****** GX 4-1548 7-2720 11-4011
RESUME 001364 R #7-2577
RMBYT = 000004 #3-285 *7-2879 *7-3005 *7-3122
RPRM = 100000 #3-343
TTDRV CREATED BY MACRO ON 13-OCT-79 AT 13:19 PAGE 3
SYMBOL CROSS REFERENCE CREF
SYMBOL VALUE REFERENCES
RUBP = 000020 #3-335 4-1473 7-2981 7-2983 7-3004 7-3166 7-3168 8-3535
R$$11S = ****** 7-2700
SOLI = 000100 #3-333 4-1352 4-1473 6-2351 8-3342 8-3535
STATS = 000000 #3-283 4-1112 4-1186 5-1955 5-1977 6-2350 *7-2691 8-3340 *8-3355
15-4669
STRBF = 000002 #3-284 6-2454 7-2852 7-3007
S.CSR = ****** GX 12-4039 13-4223 14-4387
S.CTM = ****** GX *8-3356 *10-3903 *12-4040
S.ITM = ****** GX 12-4040
S.PKT = ****** GX 5-1975
S.PRI = ****** GX 4-1548 7-2720
S.STS = ****** GX *6-2364 7-2644 7-2679 *7-2716
TF.AST = 000010 4-1216
TINP1 001470 R 4-1115 #7-2689
TTCAN 002106 R #8-3340 9-3765
TTINI 000110 R #4-1119 4-1341 6-2365 9-3761
TTOUT 002320 R 9-3766 #11-3925
TTOUT1 000530 R #5-1936 11-4012
TTPWF 002422 R 9-3767 #14-4387
T$$ACR = ****** 3-299 5-2132 5-2224 5-2274
T$$BTW = ****** 3-299 4-583 4-675 4-683 4-1123 4-1447 4-1476 4-1488 5-1712
5-1833 5-1873 5-1907 5-1941 5-1959 5-1988 5-2015 5-2106 5-2210
7-2784 7-2796 7-2813 8-3358 9-3755
T$$BUF = ****** 4-1375 6-2421
T$$CCA = 000000 3-299 3-304 4-990 4-1202 4-1214 4-1247 7-2513 7-2648 7-2670
7-2693
T$$CCO = ****** 3-299 4-1488
T$$CTR = ****** 5-1833 5-1907 5-1941 7-2777 7-2813
T$$ESC = ****** 3-299 3-308 3-376 4-1202 4-1221 4-1247 6-2381 7-2732 7-2759
7-3023 7-3040 7-3138 7-3170 7-3211 7-3218 8-3358 8-3541
T$$GMC = ****** 3-485 4-812 4-851 4-857 4-958 4-982 4-1240
T$$GTS = ****** 3-403 4-851 4-857 4-892 4-982 4-1240
T$$HLD = ****** 3-299 3-550 5-1785 5-1797 13-4249 13-4258 13-4267 13-4311 13-4322
T$$LWC = ****** 7-2732 7-3050 7-3097
T$$MIN = 000000 4-1134 4-1189 4-1343 4-1445 5-1957 5-2013 5-2037 5-2104 5-2182
5-2210 7-2738 7-2854 13-4231 13-4277
T$$NCO = 000000 7-2614
T$$RNE = ****** 3-270 4-1280 7-2881 7-3080 7-3147 7-3211
T$$RPR = ****** 3-270 3-300 4-583 4-595 4-675 4-1007 4-1233 4-1332 4-1354
4-1463 4-1511 4-1551 5-1632 5-1839 6-2330 7-2579 7-2634 8-3358
9-3755
T$$RST = ****** 3-270 4-1271 7-2588 7-2726 7-3129 7-3180 7-3211
T$$RUB = ****** 3-556 5-2256 7-2768 7-2897
T$$SMC = ****** 3-485 4-812 4-851 4-857 4-911 4-982 4-1240
T$$SYN = ****** 3-300 5-1797 7-3160 12-4032 13-4249 13-4258 13-4267 13-4311 13-4363
T$$TRW = ****** 3-270 3-300 4-1262 4-1500 4-1511 5-2070 7-2588 7-2726 7-2732
7-3211 13-4238
T$$UTB = ****** 3-262 3-300 4-1291 4-1315 4-1332 5-1907 6-2396 6-2419 7-2866
7-3009 7-3111 8-3508
T$$VBF = ****** 4-1317 6-2456 8-3486
T$$18S = ****** 3-300 4-1530 5-2165 12-4032 13-4249 13-4267 13-4279
T$$30P = ****** 3-300 5-1698 5-1779 5-1818 7-2556 7-3154
TTDRV CREATED BY MACRO ON 13-OCT-79 AT 13:19 PAGE 4
SYMBOL CROSS REFERENCE CREF
SYMBOL VALUE REFERENCES
T1 = 000000 #3-299 3-300
UIFP = 000200 #3-332 4-1110 7-2681 7-2691
UOFF = 000001 #3-367
UPND = 000200 #3-355
US.BSY = ****** GX 6-2363 7-2715
US.ECH = ****** GX 4-1121 5-2047 7-2574 7-2576 8-3353
US.OUT = ****** GX 10-3896 10-3902 11-4010 12-4108
U.ATT = ****** GX 4-1495 7-2531 7-2661
U.BUF = ****** GX 6-2438 6-2442
U.CNT = ****** GX 4-1112 4-1130 4-1186 *5-1868 5-1936 *5-1938 5-1955 5-1977 5-1980
5-1983 6-2350 6-2372 6-2454 7-2528 7-2689 *7-2690 *7-2691 7-2695
*7-2707 7-3005 8-3340 *8-3354 *8-3355 8-3518 15-4669
U.CW2 = ****** GX 5-2127 5-2194 7-2657
U.CW4 = ****** GX 5-2232 7-2707
U.SCB = ****** GX 4-1114 15-4667
U.STS = ****** GX 4-1119 *4-1121 *5-2047 *6-2363 7-2574 *7-2576 *7-2715 *8-3353 10-3896
*10-3902 *11-4010 *12-4108
U2.L3S = ****** GX 5-2127
U2.VT5 = ****** GX 5-2194
WESC = 000040 #3-359 4-1251
XOFF = 000400 #3-353
$ALOCB = ****** GX 7-2521 8-3494
$DEACB = ****** GX 6-2468
$DLINP 002372 RG #13-4217
$DLOUT 002264 RG #10-3885
$FORK = ****** GX 5-1889 6-2341 7-2683
$GTBYT = ****** GX 5-1870
$GTPKT = ****** GX 4-1132
$IOALT = ****** GX 4-1340
$IODON = ****** GX 5-2004 6-2453
$QASTT = ****** GX 7-2532
$QMCRL = ****** GX 6-2362
$TTINP 002372 RG #13-4216
$TTOUT 002264 RG #10-3884
$TTTBL 002254 RG #9-3752
TTDRV CREATED BY MACRO ON 13-OCT-79 AT 13:19 PAGE 5
MACRO CROSS REFERENCE CREF
MACRO NAME REFERENCES
CALL 4-1132 4-1325 4-1340 4-1485 5-1870 5-1889 5-2004 6-2341 6-2362 6-2453
6-2468 7-2519 7-2521 7-2532 7-2624 7-2683 7-2708 8-3494 15-4673
CALLR #4-1115 #4-1549 #5-2272 #10-3904 #11-4012 #13-4265
MTPS 4-1548 7-2720 11-4011
PCBDF$ #3-235 3-236
RETURN #4-1350 #5-2048 #7-2631 #8-3365 #8-3547 #10-3901 #12-4109 #14-4599 #15-4675
TTSAV$ #3-165 #10-3886 #13-4218
TTSET$ #3-191 15-4665
TTSYM$ #3-235 3-237