Trailing-Edge
-
PDP-10 Archives
-
BB-4170G-SM
-
sources/ttdcdv.mac
There are no other files named ttdcdv.mac in the archive.
;<3-MONITOR>TTDCDV.MAC.17, 9-Nov-77 09:58:41, EDIT BY KIRSCHEN
;MORE COPYRIGHT UPDATING...
;<3-MONITOR>TTDCDV.MAC.16, 12-Oct-77 14:17:55, EDIT BY KIRSCHEN
;UPDATE COPYRIGHT FOR RELEASE 3
;<3-MONITOR>TTDCDV.MAC.15, 15-Sep-77 11:34:02, EDIT BY MILLER
;CHANGE TTVT12 OFFSET TO SET PARITY
;<3-MONITOR>TTDCDV.MAC.14, 30-Jul-77 01:47:53, EDIT BY CROSSLAND
;REUSE TTVT11 FOR DEASIGNING DYNAMIC DATA
;<3-MONITOR>TTDCDV.MAC.13, 16-Jun-77 21:08:02, EDIT BY CROSSLAND
;CHANGE TTVT08 TO R SO IT WILL FALL INTO STPAR4 INSTEAD OF CALLING IT
;<3-MONITOR>TTDCDV.MAC.12, 9-Jun-77 04:30:18, EDIT BY CROSSLAND
;CHANGE TTVT12 AND TTVT19 TO FNXCT
;<3-MONITOR>TTDCDV.MAC.11, 7-Jun-77 17:17:59, EDIT BY HALL
;TCO 1740 - ADD TTVT38
;<3-MONITOR>TTDCDV.MAC.10, 8-May-77 16:41:03, Edit by MCLEAN
;ADD CONO DLS,DLSCHN TO DCRST2
;<3-MONITOR>TTDCDV.MAC.9, 8-May-77 16:22:35, Edit by MCLEAN
;<3-MONITOR>TTDCDV.MAC.8, 8-May-77 16:21:09, Edit by MCLEAN
;MOVE IN TTPSIF ETC
;<3-MONITOR>TTDCDV.MAC.7, 6-May-77 12:31:07, EDIT BY HALL
;TCO 1740 - VECTOR CHANGES FOR TTMSG JSYS
;<3-MONITOR>TTDCDV.MAC.6, 3-May-77 22:46:55, EDIT BY CROSSLAND
;<3-MONITOR>TTDCDV.MAC.5, 3-May-77 10:06:32, EDIT BY CROSSLAND
;TCO 1742 MERGE ARPANET SOURCES
;<3-MONITOR>TTDCDV.MAC.4, 27-Mar-77 14:03:41, Edit by MCLEAN
;SOME COMMENT FIXUP
;<3-MONITOR>TTDCDV.MAC.3, 22-Mar-77 01:12:31, Edit by MCLEAN
;ADD PRINTX
;<3-MONITOR>TTDCDV.MAC.2, 20-Mar-77 02:48:34, Edit by MCLEAN
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1976, 1977, 1978 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
SUBTTL DC10 DEVICE DEPENDENT CODE
; VECTOR TABLE
RESCD
TTDCVT=.
TTDDLN ;LENGTH OF DYNAMIC DATA FOR THIS TYPE
-1 ;FIRST LINE OF THIS TYPE/-1 NO LINES
IFIW!DCTABI ;TTVT00 -INITALIZATION
IFIW!DCRST2 ;RESTART
IFIW!TTCOB5 ;CLEAR OUTPUT BUFFER
IFIW!R ;SET LINE SPEED
IFIW!TTRSP1 ;READ TTY SPEED
IFIW!R ;TTVT05 - SET NON-TERM STATUS
IFIW!R ;READ NON-TERM STATUS
IFIW!TTSTO3 ;REMOVE CHAR FROM OUTPUT BUFFER
IFIW!R ;STPAR JSYS
IFIW!RSKP ;CHECK PHYSICAL LINE
IFIW!TTXON2 ;TTVT10 -XON
IFIW!TTYDE0 ;DEASIGN DYNAMIC DATA
TRO 1,200 ;SET PARITY BIT
IFIW!STRTO1 ;START OUTPUT LINE
IFIW!R ;XOFF
IFIW!R ;TTVT15 - XON
IFIW!TTCQ1 ;EMPTY BUFFER
IFIW!TT7CX2 ;CARRIER ON
IFIW!TTCX2 ;CARRIER OFF
IFIW!TTHU3 ;HANGUP
IFIW!R ;TTVT20 -^S
IFIW!TTC7S1 ;NO LOGINS
IFIW!BIGST1 ;STOBIGST1E CHABIGST1ACTEBIGST1
IFIW!TTSND3 ;SEND CHARACTER
IFIW!TTDAL6 ;DEALLOCATE LINE
IFIW!DLSSX2 ;TTVT25 - BUFFER OVERFLOW
IFIW!R ;EMPTY BUFFER
IFIW!RSKP ;TTVT27 - DO SENDALL FOR SINGLE LINE
IFIW!R ;ENABLE/DISABLE DATASETS
IFIW!R ;INIT
IFIW!R ;30 CLEAR INPUT BUFFER
IFIW!R ;31 DOBE
IFIW!R ;32 INPUT GA
IFIW!TTSET1 ;33 SET INIT. VALUES FOR A LINE
IFIW!TTSBE1 ;34 SOBE
IFIW!TTOBE1 ;35 WAKEUP IF OUTPUT BUFFER EMPTY
IFIW!RSKP ;TTVT36 - LET TTMSG DO SINGLE LINE
IFIW!RSKP ;TTVT37 - LET TTMSG DO ALL LINES
JFCL ;TTVT38 - ADJUST WAKEUP CLASS
IFN <.-TTVTMX>-TTDCVT,<PRINTX %%INVALID DEVICE DEPENDENT TABLE SIZE>
;DC10 DEPENDENT CODE FOR TTYSRV
; FLAG FOR LOSING PI'S
RS TTPSIF,1 ;FLAG FOR PI CHANNEL OK
;DC10E CONTROL -- IF LINE GROUP X IS CONTROLLED BY DC12E GROUP Y,
;DEFINE A PARAMETER OF THE FORM D10GX==Y. APPROPRIATE TABLES WILL
;BE ASSEMBLED BASED ON EXISTENCE OF SUCH PARAMETERS
D10G1==7 ;GROUP 1 CONTROLLED BY GROUP 7
DLSCNI==1B31+1B32 ;BITS OF INTEREST (REC + XMIT) IN CONI DLS.
DLSACT==1B26 ;ACTIVATE LEVEL IN DATAO
DLSDLB==1B29 ;DIRECTED LINE BIT, LH OF DATAO
;DC10E CORRESPONDENCE TABLES
;CORRESPONDENCE IS GIVEN BY PARAMETERS OF THE FORM DC10GX=Y
;WHICH MEANS THAT LINE GROUP X IS CONTROLLED BY DC10E GROUP Y
;THIS TABLE GIVES THE DC10E GROUP IF ANY WHEN INDEXED BY A LINE GROUP
DCTAB:
DEFINE TTEST(G)<
IFDEF D10G'G,<D10G'G*10>
IFNDEF D10G'G,<1B0>
>
TTEST(0)
TTEST(1)
TTEST(2)
TTEST(3)
TTEST(4)
TTEST(5)
TTEST(6)
TTEST(7)
;INVERSE OF ABOVE - GIVES INTERNAL GROUP FOR DC10E GROUP
;SETUP AT INIT TIME
DCTAB1: REPEAT 10,<1B18>
DCTABI:
REPEAT 0,<
CALL DXLINI
SETZ 1,
MOVSI 3,-10 ;SCAN DCTAB TO BUILD DCTAB1
DCTABJ: LDB 2,[POINT 3,DCTAB(3),32] ;GET 'GROUP' FIELD
SKIPL DCTAB(3) ;ENTRY IN USE?
HRRZM 1,DCTAB1(2) ;YES, SETUP INVERSE
ADDI 1,10
AOBJN 3,DCTABJ
CONO DLS,DLSCHN ;SET PI LEVEL FOR DC10
>
RET
DCRST2:
CONO DLS,DLSCHN ;SET CHANNEL PI LEVEL
REPEAT 0,<
MOVSI 2,-DLSN ;ACTIVATE DLS LINES (BUT NOT CTY)
TTSTR2: CALL TTECNV ;GET CORRESPONDING DC10E LINE
HRRI 3,1B29 ;SET ACTIVATE
SKIPL 3 ;SKIP IF NO DC10E HERE
DATAO DLS,3
AOBJN 2,TTSTR2
>
RET
REPEAT 0,<
;EITHER ALL LINES OR ONE DC10 WAS SPECIFIED.
; T1/ LINE NUMBER OR -1 FOR ALL
; T2/ POINTER TO STRING
TTMSG3: JUMPGE 1,TPA5 ;IF ONLY ONE, GO DO IT
MOVSI P6,-DLSN ;ALL. DO ALL DC10 LINES
CALL TPADC
RET ;DO OTHERS
TPADC:
PUSH P,1
PUSH P,2
TPA6: MOVE P5,0(P) ;BYTE POINTER
MOVEI 2,0(P6) ;LINE NUMBER
TPA3: XCTBU [ILDB 1,P5]
JUMPE 1,TPA1 ;TERMINATE ON NULL
CALL TCEO2
CAIE 1,.CHLFD ;LF?
JRST TPA3 ;NO
MOVEI P4,4 ;DO 4 FILLS
MOVEI 1,TTFILL
CALL TCEO2
SOJG P4,.-1
JRST TPA3
TPA1: AOBJN P6,TPA6
POP P,2
POP P,1
RET
TPA5: HRROI P6,0(1) ;DO ONE LINE OF GIVEN NUMBER
CALL TPADC
RET
>
TTCH7D:
REPEAT 0,<
IFG NTTD10,< ;IF THERE ARE ANY DC10 LINES
CONI DLS,1 ;CHECK FOR LOST PI
ANDI 1,7
CAIN 1,DLSCHN ;CORRECTLY SET?
JRST TTCH8A ;YES
CONO DLS,DLSCHN ;AND RESET IT
CONI DLS,1
ANDI 1,7
CAIN 1,DLSCHN
JRST TTCH8C
SKIPN TTPSIF
JRST TTCH8B
BUG(INF,TTYPI2,<SCANNER LOST PI ASSIGNMENT, COULD NOT RESTORE>)
SETZM TTPSIF
JRST TTCH8B
TTCH8C: BUG(INF,TTYPI1,<SCANNER LOST PI ASSIGNMENT, SUCCESSFULLY RESTORED>)
TTCH8A: SETOM TTPSIF ;FLAG PSI OK
TTCH8B: SKIPN 1,TTHNGT ;ACTIVE LINE TO BE CHECKED?
JRST TTHNG1 ;NO
MOVE 2,TTHNGL ;YES, GET LINE NUMBER
CAML 1,TODCLK ;INTERRUPT OVERDUE?
JRST TTHNG4 ;NO, KEEP WAITING
AOS TTHNGN ;YES, COUNT UNHANGS
HRLM 2,TTHNGN ;REMEMBER LAST HUNG LINE
CALL TTSN10 ;POKE OUTPUT
TTHNG1: AOS 2,TTHNGL ;GET NEXT LINE
; * * * *
NEEDS WORK
CAIGE 2,NTTYS ;STILL IN REAL LINES, AND
SKIPL TTMOD1(2) ;STILL DC10 LINE?
SETZB 2,TTHNGL ;NO, WRAPAROUND LINE NUMBERS
MOVE 1,TODCLK
ADDI 1,^D500 ;1/2 SECOND LATER
MOVEM 1,TTHNGT ;IS TIME AT WHICH LINE IS CALLED HUNG
SKIPL TTFLGS(2) ;LINE NOW ACTIVE?
; * * * *
SETZM TTHNGT ;NO, DON'T CHECK
> ;END OF DC10 CONDITIONAL
>
; * * * * *
;TEMP
;FIND DC10E LINE CORRESPONDING TO DATA LINE
TTECNV:
REPEAT 0,<
PUSH P,2
ANDI 2,77
IDIVI 2,10 ;GET GROUP NUMBER
ADD 3,DCTAB(2)
JUMPL 3,.+2
MOVSI 3,DLSDLB(3) ;SETUP FOR DATAO
POP P,2
>
RET
;DLS CHANNEL INTERRUPT SERVICE
;CALLED WITH JSYS FROM CHANNEL SEQUENCE
IFN DCFLG,< ;CODE FOR NON-KL'S
DLSSV::
IFE DTFLG,<
CONI TTY,1 ;CONSOLE TTY
TRNE 1,7 ;PI ASSIGNED?
TRNN 1,50 ;AND SERVICE NEEDED?
JRST DLSSV2
JRST TTYSV
DLSSV2:
>
CONSO DLS,DLSCNI ;XMIT OR REC?
RET
;SERVICE DLS
DATAI DLS,1
TRNN 1,DLSRCF ;IF NOT RECEIVER FLAG,
DATAO DLS,[400] ;RELEASE SCANNER
HLRZ 2,1 ;LINE NUMBER
CAIG 2,DLSN ;LEGAL DC10 LINE?
JRST TTYSV1 ;YES
IFN DECDLS,<
IDIVI 2,10
HRRE 2,DCTAB1(2) ;SEE IF THIS IS DC10E LINE
JUMPL 2,DLSSV3 ;NO, RANDOM LINE
ADDI 2,0(3) ;YES, COMPUTE CORRESPONDING DATA LINE
IORI 1,DLSCXF ;AND NOTE CARRIER CHANGE
HRLI 1,0(2) ;PUT NEW NUMBER IN DATAI WORD
>
IFE DECDLS,<
JRST DLSSV3
>
TTYSV1: TRNE 1,DLSRCF+DLSCXF ;RECEIVER OR XITION
CALL BIGSTO ;YES, PUT IN BIG BUFFER
DLSSV1: TRNN 1,DLSRCF ;IF NOT RECEIVER FLAG,
CALL TTSND ;DO OUTPUT
DLSSV3: UNBRK DLS
> ;END OF DTFLG EQ CONDITIONAL
;DC10 LINE. WAIT A WHILE TO SEE IF CARRIER STAYS ON. IF SO, CREATE
;A JOB ON THE LINE AS IF CTRL/C HAD BEEN TYPED
TT7CX2: MOVE T3,[TTCON] ;T3/ ROUTINE TO CALL
CALL TTQAD1 ;SCHEDULE RECHECK OF CARRIER
JRST TTCH7 ;DONE WITH THIS CHARACTER
;THIS IS A DC10 LINE. SCHEDULE IN 3 SECONDS A CALL TO TTCOF. IF
;CARRIER IS STILL OFF AT THAT TIME, IT WILL BE ASSUMED TO BE OFF
;PERMANENTLY. IT IS NOT NECESSARY TO DO THIS FOR TT.FE LINES BECAUSE
;THE FRONT END DOES IT
TTCX2: MOVE C,[TTCOF] ;QUEUE A CHECK FOR 3 SEC.
CALL TTQAD1
JRST TTCH7
;THIS IS A DC10 LINE. WAIT UNTIL LINE IS INACTIVE AND
;DEACTIVATE IT
TTHU3: MOVE 3,[TTHU0] ;MAYBE SAME ROUTINE AGAIN
MOVE D,B ;SAVE LINE NUMBER
CALL STADYN ;POINT TO DYNAMIC DATA
JRST TTHU4 ;NOT ACTIVE
JE TTOTP,(T2),TTHU4 ;JUMP IF NOT ACTIVELY DOING OUTPUT
MOVE B,D ;LINE IS ACTIVE. B/ LINE NUMBER
CALLRET TTQAD1 ;RE-QUEUE THIS ROUTINE FOR 1 SEC.
;LINE WAS NOT ACTIVE. DEACTIVATE AND SCHEDULE REACTIVATE FOR LATER
TTHU4: MOVE B,D ;GET LINE NUMBER
CALL TTECNV ;GET DC10E LINE IF ANY
HRRI 3,0 ;CLEAR ACTIVATE
SKIPL 3 ;SKIP IF NO DC10E FOR LINE
DATAO DLS,3
MOVEI 1,^D100 ;WAIT 100 MS.
MOVE 3,[TTHU1] ;T3/ ROUTINE TO CALL
CALLRET TTQAD ;SCHEDULE ACTIVATING OF LINE
;TTHU1 - ACTIVATE A LINE
;ACCEPTS:
; T2/ LINE NUMBER
; CALL TTHU1
;RETURNS +1: ALWAYS
;CALLED FOR DC10 LINES ONLY
TTHU1: CALL TTECNV ;GET CORRESPONDING DC10E LINE
HRRI 3,1B29 ;SET ACTIVATE
SKIPL 3 ;SKIP IF NO DC10E FOR LINE
DATAO DLS,3
RET
;TTSND..
;DC10 LINE
;* * * *
;NEEDS WORK
; * * * *
TTSND3: CAMN B,TTHNGL ;THIS LINE BEING CHECKED FOR HUNG?
SETZM TTHNGT ;YES. CLEAR IT
CAME 2,CTYLNO ;IS CONSOLE TTY?
JRST TTSND5 ;NO
DATAO TTY,3 ;YES
JRST TTSND4
TTSND5: HRLI 3,DLSDLB(2) ;DIRECTED LINE BIT
IORI 3,DLSACT ;ACTIVATE BIT
DATAO DLS,3
TTSND4: SETONE TTOTP,(T2) ;SET OUTPUT ACTIVE
RET