Trailing-Edge
-
PDP-10 Archives
-
custsupcuspmar86_bb-x130b-sb
-
dlsint.mac
There are 9 other files named dlsint.mac in the archive. Click here to see a list.
SEARCH F,S
$RELOC
$HIGH
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
.CPYRT<1973,1986>
;COPYRIGHT (C) 1973,1974,1975,1976,1977,1978,1979,1980,1984,1986
;BY DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
;ALL RIGHTS RESERVED.
DEFINE ISRNAM(N),<
TITLE DL'N'INT -- INTERRUPT SERVICE FOR DC10 - NUMBER N - 547
SUBTTL /RCC/DAL - 10 SEP 85
XP VDL'N'IT,547
IFG N-1,< PRINTX ?ONLY 2 DC10S ON ANY DECSYSTEM-10>
ENTRY DL'N'INT ;FOR LINK-10
DL'N'INT::CONSO DLS,30
JRST .-1
JRST DLSINT
DSCOFS==DSCOF'N## ;OFFSET INTO DSCTAB
DL'N'DSP::JRST SCNTYP ;DATA OUT
JRST DSCTYP ;DATA SET CONTROL
JRST SCNCHK ;PI TEST
JRST DLSINI ;INIT
POPJ P, ;CHANGE HARDWARE PARMS
POPJ P, ;LINE PARM CTL
POPJ P, ;SET ELEMENT
POPJ P, ;REMOTE STATION STUFF
JRST DLSOFL ;OFF LINE TEST
DLSMXD==DL'N'MXD## ;MAX LINE NUMBER
DLSMXL==DL'N'MXL## ;MAXIMUM DATASET NUMBER
DLSOFS==DL'N'OFS## ;OFFSET FROM HARDWARE TO LINTAB
IFE N,<
DLS==240 ;HARDWARE ADDRESS
>
IFE <N-1>,<
DLS==244
>
;STILL IN ISRNAM DEFINITION
;ONCE A TICK CODE TO START OUTPUT
DL'N'STO::PUSH P,T1
DL'N'ST1:PUSHJ P,TOTAKE##
JRST TPOPJ##
MOVEI T1,L1RCHP##
ANDCAM T1,LDBBYT##(U) ;CLEAR CHP BIT
SKIPGE LDBDCH##(U) ;DON'T START AN ACTIVE LINE
PUSHJ P,XMTCHR##
JRST DL'N'ST2
PUSHJ P,SCNTYP
PUSHJ P,CLRIRM##
DL'N'ST2:MOVE T1,(P)
JRST DL'N'ST1
>
IFNDEF DLSNUM,<DLSNUM==0>
ISRNAM(\DLSNUM)
;BITS IN T3 TO COMMUNICATE WITH THE HARDWARE (CONSIDERING 680 AS HARDWARE)
USDRLN==100 ;USE DIRECTED LINE NUMBER
TDSABL==400 ;TRANSMIT DISABLE
RCVBIT==400 ;DATAI FROM DLS OR 680 WAS RECEIVE
;INT, NOT XMT DONE
DLSOHE==100 ;OFF-HOOK ENABLE TO DC10E
DLSART==200 ;REQUEST ARTIFICIAL INTERRUPT FROM DC10E
DLSCAR==4 ;CARRIER IS ON, IN DC10E DATAI
DLSRNG==2 ;LINE RINGING, IN DC10E DATAI
DLSCRQ==40 ;CALL REQUEST, DATAO
DLSDPR==20 ;DIGIT PRESENT, DATAO
DLSPND==20 ;PRESENT NEXT DIGIT, DATAI
;DEVICE-DEPENDENT PORTION OF INITIALIZATION CODE
;CALL: PUSHJ P,SCNINI
DLSINI: CONO DLS,40 ;I/O RESET TO DC10
SETZM DLSERR ;CLEAR COUNT OF LOST PI ERRORS
CONO DLS,SCNCHN## ;ASSIGN ITS PI
POPJ P,0 ;RETURN FROM DLSINI
DLSOFL: CONSZ DLS,7
JRST CPOPJ1##
PUSHJ P,SCNCHK
CONSZ DLS,7
AOS (P)
POPJ P,0
DLSINT: JSR SCNSAV## ;YES. GET AC'S AND P
DATAI DLS,T3 ;GET WHAT THE DC10 SAID
SCNNT1: HLRZ U,T3 ;GET THE HARDWARE LINE NUMBER
TRNE T3,RCVBIT ;RECEIVE OR TRANSMIT?
JRST SCNREC ;RECEIVE.
DATAO DLS,[TDSABL] ;TRANSMIT. FIRST CLEAR FLAG
CAILE U,DLSMXD ;LEGAL LINE NUMBER?
POPJ P, ;NO--DO NOT KICK SCNSER
ADDI U,DLSOFS ;YES--CONVERT TO LINTAB INDEX
JRST XMTINT## ;CALL SCNSER
SCNREC: CAIG U,DLSMXD ;DATASET CONTROL OR JUST DATA?
JRST SCNRC0 ;HAVE RECEIVED DATA
CAILE U,DLSMXL ;LEGAL DC10E LINE?
POPJ P,0 ;NO. JUNK IT.
SUBI U,DSCOFS ;CONVERT TO TABLE ADDRESS
ANDI T3,DLSCAR!DLSRNG!DLSPND
MOVE T1,DSCTAB##(U) ;GET CONTROL BITS
TLNN T1,DSCDLW## ;IN DIALLER CODE?
TRZ T3,DLSPND ;NO, IGNORE DIALLER
HRR T1,T3 ;COPY HARDWARE BITS
TRNE T3,DLSCAR ;CARRIER ON?
TLC T1,DSCHWC## ;YES. XOR THE TWO BITS
TLNE T1,DSCHWC## ;CARRIER CHANGE?
JRST DSCRC1 ;YES. THATS MAIN FLAG.
MOVEI T3,DSTPND## ;PRESENT NEXT DIGIT
TRNE T1,DLSPND ;IS THAT IT?
JRST DSCREC## ;YES.
MOVEI T3,DSTRNG## ;RING TRANSACTION CODE
TRNE T1,DLSRNG ;IS IT A RING?
JRST DSCREC## ;YES. INFORM SCNSER
DSCRC1: MOVEI T3,DSTOFF## ;NO. TRY OFF TRANSACTION
TRNE T1,DLSCAR ;CARRIER ON?
MOVEI T3,DSTON## ;YES. ON-COMING TRANSACTION
JRST DSCREC## ;PASS TO SCNSER
SCNRC0: ADDI U,DLSOFS ;CONVERT TO LINTAB INDEX
ANDI T3,CK.CHR ;KEEP ONLY CHARACTER
JRST RECINT## ;CALL SCNSER
;HERE TO EXERCISE CONTROL OVER A DATASET. TRANSACTION CODE IN T3,
; DSCTAB INDEX IN LINE. ENTERED FROM SCNSER ONLY.
DSCTYP: CAIN T3,DSTON## ;IS CODE FOR ON?
JRST DSDON ;YES. DRIVEN ON FLAG
CAIN T3,DSTOFF## ;NO. FOR OFF?
JRST DSDOFF ;YES. DISPATCH.
CAIN T3,DSTCRQ## ;PLACE OUTGOING CALL REQUEST?
JRST DSDCRQ ;YES
CAIG T3,DSTPND##+17 ;DIGIT TO DIAL?
CAIGE T3,DSTPND## ; ..
SKIPA ; NO.
JRST DSDPND ;YES.
CAIE T3,DSTREQ## ;REQUEST SATATUS?
POPJ P,0 ;NO. ERRONEOUS CODE. DISMISS.
;HERE TO REQUEST STATUS OF A LINE, ONLY DURING TTYINI. THUS
; IT IS OK TO GO INTO A WAIT-LOOP TO ACCOMPLISH THIS, AND TO IGNORE
; ANY OTHER ACTIVITY.
MOVSI T3,USDRLN+DSCOFS(U) ;PUT DIRECTED LINE NUMBER IN LH
HRRI T3,DLSOHE+DLSART ;REQUEST ARTIFICIAL INT, KEEP OFFHOOK ENABLE
DATAO DLS,T3 ;SEND TO DC10
MOVEI T1,1000 ;TIMEOUT, IN CASE DC10E DEAD
DSCIL2: CONSZ DLS,30 ;WAIT FOR INTERRUPT
JRST DSDRQ1 ;GOT A FLAG. SEE WHAT IT IS
SOJG T1,DSCIL2 ;WAIT FOR FLAG
DSRQOF: MOVEI T3,DSTOFF## ;TELL SCNSER IT'S OFF.
POPJ P,0 ;RETURN TO SCNSER
DSDRQ1: DATAI DLS,T3 ;SEE WHAT THE DC10 SAYS
TRNE T3,RCVBIT ;IS IT A RECEIVE FLAG?
JRST DSDRQ2 ;YES. GOOD.
DATAO DLS,[EXP TDSABL] ;NO. RANDOM XMT FLAG. JUNK IT.
JRST DSCIL2 ;AND KEEP WAITING
DSDRQ2: HLRZ T2,T3 ;GET LINE NUMBER FROM DC10 INT.
CAIE T2,DSCOFS(U) ;CORRECT FOR THIS REQUEST?
JRST DSCIL2 ;NO. IGNORE IT.
TRNN T3,DLSCAR ;YES. IS CARRIER ON?
JRST DSRQOF ;NO. TELL SCNSER ITS OFF
MOVEI T3,DSTON## ;YES. TELL SCNSER.
POPJ P,0 ;RETURN FROM DSCTYP
;STILL IN FTMODM
;HERE TO DRIVE A DATASET ON.
DSDON: MOVEI T2,DLSOHE ;BIT FOR DC10E
JRST DSDOF1 ;SEE WHICH TO USE
;HERE TO DRIVE A DATASET OFF.
DSDOFF: MOVEI T2,0 ;BIT FOR DC10E OFF
DSDOF1: MOVEI T1,0(U) ;GET COPY OF LINE NUMBER
ADDI T1,DSCOFS ;CORRECT TO DC10E NUMBER
MOVE T3,T2 ;GET BIT (OR NOT) FOR DC10E
JRST SCNTY1 ;SEND TO DC10
DSDCRQ: MOVEI T1,0(U) ;COPY DSCTAB INDEX
ADDI T1,DSCOFS ;CONVERT TO DC10E PHYSICAL LINE NUMBER
MOVEI T3,DLSOHE!DLSCRQ ;REQUEST LINE
JRST SCNTY1 ;SEND TO HARDWARE
DSDPND: MOVEI T1,0(U) ;COPY DSCTAB INDEX
ADDI T1,DSCOFS ;CONVERT TO PHYSICAL LINE IN DC10E
ANDI T3,17 ;JUST THE DESIRED DIGIT
CAIN T3,16 ;FLAG FOR SECOND DIAL TONE DELAY?
JRST DSDSDT ;YES. GO WAIT FOR SECOND DIAL TONE
TRO T3,DLSOHE!DLSDPR!DLSCRQ
JRST SCNTY1 ;SEND THE DIGIT TO DC10E
DSDSDT: MOVE T1,TICSEC## ;ONE SECOND
IMULI T1,5 ;FIVE SECONDS
HRLI T1,DLSCLK ;WHERE TO COME ON CLK LEVEL
SYSPIF ;FOR CLOCK REQUEST
IDPB T1,CLOCK## ;PUT IN QUEUE
IBP CLOCK## ;TWO WORDS/ENTRY
SYSPIN ;OK FOR INT'S NOW
POPJ P,0 ;DISMISS, WAIT FOR CLOCK.
;HERE ON CLOCK LEVEL AFTER WAITING FOR SECOND DIAL TONE
DLSCLK: MOVE T3,DSDUNI## ;GET TTY NUMBER FOR DIALLER
MOVE U,LINTAB##(T3) ;LINE TABLE ENTRY IS LDB ADDRESS
LDB T3,LDPDSC## ;GET THE DATASET CONTROLLER INDEX
MOVSI T3,DSCOFS(T3) ;DC10E LINE NUMBER TO LEFT HALF
HRRI T3,RCVBIT!DLSPND ;PRETEND IT WAS RECEIPT OF NEXT DIGIT
JRST SCNNT1 ;AND JUMP INTO RECEIVE INTERRUPT CODE
;ROUTINE TO OUTPUT A CHARACTER TO A LINE
;CALLED FROM TYPE IN SCNSER
;WITH 8-BITS OF CHARACTER IN T3
SCNTYP: ANDI T3,377 ;MAKE SURE NO JUNK
LDB T1,LDPLNO## ;PICK UP LINE NUMBER
SUBI T1,DLSOFS ;CONVERT LINE #
SCNTY1: HRL T3,T1 ;SET UP LINE NUMBER IN T3 LH
TLO T3,USDRLN ;AND DIRECT TO THAT LINE
DATAO DLS,T3 ;OUT TO SCANNER
POPJ P,0 ;AND RETURN
SCNCHK: CONSZ DLS,7 ;ANY PI CHAN ON DC10?
POPJ P,0 ;YES. OK
CONO DLS,SCNCHN## ;NO. RE ASSIGN IT
AOS DLSERR ;AND COUNT OCCURRENCE OF ERROR
POPJ P,0 ;RETURN TO CLOCK
$LOW
DLSERR: 0 ;COUNT OF LOST PI CHANNEL ERRORS
$LIT
DLSEND: END