Trailing-Edge
-
PDP-10 Archives
-
cust_sup_cusp_bb-x130c-sb
-
10,7/unsmon/cciint.mac
There are 8 other files named cciint.mac in the archive. Click here to see a list.
SUBTTL R CLEMENTS /RCC/DAL -30 AUG 88 - V536
SEARCH F,S
$RELOC
$HIGH
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED
; OR COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION
; 1973,1974,1975,1976,1977,1978,1979,1980,1984,1986,1988.
;ALL RIGHTS RESERVED.
.CPYRT<1973,1988>
XP VCCIIT,536
;BITS IN T3 TO COMMUNICATE WITH THE HARDWARE (CONSIDERING 680 AS HARDWARE)
RCVBIT==400 ;DATAI FROM 680 WAS RECEIVE
;INT, NOT XMT DONE
;CODES USED FOR SCNSER-DLSTYP INTERFACE, IN CH.
;CODES BETWEEN THIS ROUTINE AND THE 680 SOFTWARE FOR DATAPHONES
;THESE MUST AGREE WITH THOSE IN THE 680 SOFTWARE
;THESE HAVE SIGN BIT OF PDP8 ON FOR CHECKING EASILY IN THE 8
;IT IS ASSUMED THAT THESE ARE DSTXXX+4000
XP CCHOFF,4001 ;TURN OFF MODEM (IT WENT OFF)
XP CCHON,4002 ;TURN ON MODEM(IT CAME ON)
XP CCHRNG,4003 ;(MODEM IS RINGING)
XP CCHREQ,4003 ;WHAT IS STATE OF MODEMS CARRIER?
;CODES FOR SPECIAL LINE CONTROL ARE DENOTED WITH
; 6000+CODE. THEY ARE SIMILAR TO DATA-SET CONTROL CODES
; EXCEPT THAT THEY CONCERN THE DATA-SIDE OF THE LINE AND
; ARE HANDLED BY LNCREC IN SCNSER.
;TO-10 CODES IN USE:
; 1 ENABLE HUNG CHECKING (IRMA CATCHED)
; 2 DISABLE HUNG CHECKING
;
;FROM-10 CODES IN USE:
; NONE
DEFINE ISRNAM(N),< ;SEPERATE ROUTINE FOR EACH CCI
TITLE CC'N'INT -- INTERRUPT SERVICE FOR DA10/DC68A NUMBER N
IFE N,< CCI==414> ;DEVICE ADDRESS FOR CCI
IFE <N-1>,<CCI==420> ;DEVICE ADDRESS FOR CCI2
ENTRY CC'N'INT
CC'N'INT::CONSO CCI,240
JRST .-1
JRST CCIINT
CC'N'DSP:: JRST SCNTYP ;OUTPUT DATA
JRST DSCTYP ;DATASET CONTROL
JRST SCNCHK ;TEST PIA STILL SET
JRST CCIINI ;INIT CCI
POPJ P, ;CHANGE HARDWARE PARMS
POPJ P, ;LINE PARM CONTROL
POPJ P, ;SET ELEMENT
POPJ P, ;REMOTE STATION STUFF
JRST CCIOFL ;680 UP TEST
CCIOFS==CC'N'OFS## ;OFFSET FROM LINE PHYSICAL LINE 0 TO
; SOFTWARE LINE NUMBER.
CCIMAX==M.68L'N## ;NUMBER OF LINES ON THIS 680
CCIDSO==CC'N'DSO## ;OFFSET INTO DSCTAB FOR THIS 680
;;ONCE A TICK CODE TO START OUTPUT
CC'N'STO::PUSH P,T1 ;SAVE LIST HEADER
CC'N'ST1:PUSHJ P,TOTAKE## ;FIND A LINE NEEDING SERVICE
JRST TPOPJ## ;THERE AREN'T ANY
MOVEI T1,L1RCHP## ;BIT TO CLEAR
ANDCAM T1,LDBBYT##(U) ;NO HWD PARAMETERS TO UPDATE
SKIPGE LDBDCH##(U) ;LINE ACTIVE?
PUSHJ P,XMTCHR## ;YES--GET CHARACTER TO TRANSMIT
JRST CC'N'ST2 ;IDLE
PUSHJ P,SCNTYP ;SEND IT OUT
PUSHJ P,CLRIRM## ;ZAP IRMA CUZ CHARACTER TRANSMITTED
CC'N'ST2:MOVE T1,(P) ;POINT BACK TO LIST HEADER
JRST CC'N'ST1 ;SEE IF MORE LINES TO SERVICE
>
IFNDEF CCINUM,<CCINUM==0>
ISRNAM(\CCINUM)
;DEVICE-DEPENDENT PORTION OF INITIALIZATION CODE
;CALL: PUSHJ P,SCNINI
CCIINI: CONO CCI,2510+SCNCHN## ;CLEAR DA10 AND ASSIGN PI
SETZM CCIERR ;CLEAR COUNT OF LOST PI ERRORS
POPJ P,0 ;RETURN FROM SCNINI
CCIOFL: CONSZ CCI,7
JRST CPOPJ1##
PUSHJ P,SCNCHK
CONSZ CCI,7
AOS (P)
POPJ P,0
CCIINT: CONSO CCI,40 ;YES. WHICH ONE?
JRST CCIDSM ;JUST FLAG THAT 8 ATE DATA
JSR SCNSAV## ;RECEIVE. GET SOME AC'S AND P
DATAI CCI,T3 ;SEE WHAT THE 8 HAD TO SAY
LDB U,PCCILN ;GET THE PSEUDO LINE NUMBER
CAILE U,CCIMAX ;MAKE SURE USABLE LINE
POPJ P,0 ;TOO BIG. IGNORE IT.
ADDI U,CCIOFS ;ADD IN OFFSET
TRZN T3,RCVBIT ;IS 8 SAYING KEYBOARD?
JRST XMTINT## ;NO. TRANSMIT INTERRUPT.
TRZN T3,4000 ;DATASET TRANSACTION CODE?
JRST RECINT## ;GIVE CHARACTER TO SCNSER
ANDI T3,3777 ;REMOVE LINE FIELD
TRZE T3,2000 ;SPECIAL LINE CONTROL?
JRST LNCREC## ;YES
SUBI U,CCIOFS ;CONVERT LINTAB INDEX TO 680 LINE #
ADDI U,CCIDSO ;CONVERT TO DSCTAB INDEX
JRST DSCREC## ;AND PROCESS CODE.
;STILL IN FTMODM
;HERE TO EXERCISE CONTROL OVER A DATASET. TRANSACTION CODE IN T3,
; DSCTAB INDEX IN U. 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.
CAIE T3,DSTREQ## ;REQUEST STATUS?
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.
MOVEI T3,CCHREQ ;CORRECT CODE FOR 680 SOFTWARE
HRRZ T1,DSCTAB##(U) ;LINE NUMBER TO RIGHT AC
PUSHJ P,CCITYP ;SEND TO DA10
MOVE T1,CCITIM ;TIMEOUT IN CASE 680 DEAD
CCIRQL: CONSO CCI,240 ;WAIT FOR DA10 FLAG
SOJG T1,.-1 ; ..
JUMPLE T1,DSRQOF ;NO REPONSE. ASSUME OFF.
CONSO CCI,40 ;WHICH FLAG IN DA10?
JRST CCIRQ1 ;JUST FM 10 BFR EMPTY.
DATAI CCI,T3 ;READ DATA FROM THE 8
LDB T2,PCCILN ;GET THE LINE NUMBER
CAIE T2,0(U) ;REQUESTED LINE?
JRST CCIRQL ;NO. KEEP WAITING.
ANDI T3,7777-RCVBIT ;JUST THE CHARACTER FIELD
CAIE T3,CCHON ;ON FLAG?
JRST DSRQOF ;NO. ASSUME OFF
MOVEI T3,DSTON## ;YES. TELL SCNSER.
POPJ P,0 ;RETURN FROM DSCTYP
DSRQOF: MOVEI T3,DSTOFF## ;TELL SCNSER IT'S OFF.
POPJ P,0 ;RETURN TO SCNSER
CCIRQ1: CONO CCI,400+SCNCHN## ;CLEAR FROM-10 EMPTY FLAG
JRST CCIRQL ;AND WAIT FOR ANOTHER FLAG
;HERE TO DRIVE A DATASET ON.
DSDON: MOVEI T3,CCHON ;FLAG FOR 680
JRST DSDOF1 ;SEE WHICH TO USE
;HERE TO DRIVE A DATASET OFF.
DSDOFF: MOVEI T3,CCHOFF ;FLAG FOR 680
DSDOF1: HRRZ T1,DSCTAB##(U) ;GET COPY OF LINE NUMBER
JRST CCITYP ;SEND TO 680
CCIDSM: CONO CCI,400+SCNCHN## ;CLEAR DA10 SEND DONE FLAG
XJEN SCNCHL## ;AND DISMISS
PCCILN: POINT 12,T3,23 ;SECOND PDP8 BYTE IN WORD
;ROUTINE TO OUTPUT A CHARACTER TO A LINE
;CALLED FROM TYPE IN SCNSER
;WITH 8-BITS OF CHARACTER IN T3
SCNTYP: LDB T1,LDPLNO## ;PICK UP LINE NUMBER
ANDI T3,377 ;MAKE SURE NO JUNK
CCITYP: SUBI T1,CCIOFS ;CONVERT BACK TO HARDWARE LINE #
DPB T1,PCCILN ;STORE IN THE OUTPUT WORD
MOVE T1,CCITIM ;A DELAY FOR THE SLOW 8 IF NEEDED
CONSZ CCI,1000 ;SEE IF DA10 BUFFER IS EMPTY
SOJG T1,.-1 ;IF NOT, 8 IS PROBABLY DEAD
MOVEM T1,CCITIM ;STORE UPDATED TIMEOUT
DATAO CCI,T3 ;SEND TO EIGHT
POPJ P,0 ;DONE.
SCNCHK: PUSH P,[1000] ;RESET TIMEOUT EACH SECOND
POP P,CCITIM ; SO WE DO NOT USE TOO MUCH TIME
CONSZ CCI,7 ;ANY PI CHAN ON DA10?
POPJ P,0 ;YES. RETURN
CONO CCI,2510+SCNCHN## ;NO. GIVE IT BACK TO DA10
AOS CCIERR ;COUNT OCCURRENCE OF ERROR
POPJ P,0 ;AND RETURN TO CLOCK ROUTINE
$LOW
CCITIM: 1000 ;TIMEOUT TIME FOR SLOW 8
CCIERR: 0 ;COUNT OF LOST PI ERRORS ON CCI
; $LIT
CCIEND: END