Trailing-Edge
-
PDP-10 Archives
-
decuslib10-01
-
43,50035/dlsint.mun
There are no other files named dlsint.mun in the archive.
TITLE DLSINT - INT. SERV. FOR DLS (DATA LINE SCANNER DC10)
SUBTTL M. FREDRIKSEN/RCC TS 01 JUN 69 V005
XP VDLSIT,005
;PUT VERSION NUMBER IN GLOB LISTING AND LOADER STORAGE MAP
;MODULAR HARDWARE INTERFACE WITH EITHER SCNSER OR TTYSER
EXTERNAL TYPX
IFE FTTTYSER,<XP FULTWX,200000>
IFN FTTTYSER,<XP FULTWX,4>
;ACCUMULATOR ASSIGNMENTS
CHREC=TEM ;AC FOR CHARACTER
DDB=DEVDAT ;ADDRESS OF DEVICE DATA BLOCK
LINE=TAC1 ;SCANNER LINE NUMBER
HPOS=DAT ;HORIZONTAL POSITION OF TTY.(0-71)
;BYTE POINTERS
EXTERNAL PLASTC
DLS=240 ;DC10 DEVICE NUMBER
;BITS IN CHREC TO COMMUNICATE WITH DLS
USDRLN=100 ;USE DIRECTED LINE NUMBER
TDSABL=400 ;TRANSMIT DISABLE
RCVBIT=400 ;RECEIVE BIT AFTER DATAI DLS,CHREC
;DEVICE DEPENDENT PORTION OF INITIALIZATION CODE
;CALL: MOVEI TAC,CHANNEL NUMBER
; PUSHJ PDP,SCNINI
INTERNAL SCNINI
DLSINI:
SCNINI: CONO DLS,40 ;INIT DLS COMPLETELY (I/O RESET)
CONO DLS,(TAC) ;ASSIGN PI CHANNEL NUMBER
POPJ PDP,
;SCANNER INTERRUPT SERVICE ROUTINE.
ENTRY DLSINT
INTERNAL SCNINT
EXTERNAL SCNSAV,TCONLN,TTYTAB,XMTINT,TYPE,INUS2,RECINT
DLSINT:
SCNINT: CONSO DLS,30 ;ANY INTERRUPTS ON DLS?
JRST SCNINT ;NO
JSR SCNSAV
DATAI DLS,CHREC ;GET CHARACTER & LINE INFO
HLRZ LINE,CHREC ;PUT LINE NUMBER IN AC LINE
CAIL LINE,TCONLN ;ARE WE ENABLED FOR THIS LINE NUMBER?
JRST SCNIN2 ;NO,TURN OFF TRANSMIT(IF ON) AND DISMISS
TRNE CHREC,RCVBIT ;WAS IT A RECEIVER INTERRUPT?
JRST RECINT ;YES, RECEIVER INT. HANDLER
DATAO DLS,[EXP TDSABL] ;CLEAR HARDWARE FLAG
JRST XMTINT ;GO PROCESS CHAR IN SCNSRF OR SCNSRH
;COMMON PARTS OF CTY AND SCANNER INTERRUPT SERVICE ROUTINES.
EXTERNAL INJEST,DDBSRC
INTERNAL TCOMM
TCOMM:
SKIPE DDB,TTYTAB(LINE) ;DATA BLOCK ASSIGNED?
JRST INUSE ;YES
PUSHJ PDP,DDBSRC ;SEARCH FOR FREE TTY DEV. DATA BLOCK
JRST TYPX ;NONE FOUND, TYPE X
MOVEI HPOS,0 ;ASSUME TTY IS AT BEGIN OF FORM
CAILE LINE,TCONLN ;PSEUDO CONSOLE?
JRST INJEST ;YES
CAIN LINE,TCONLN ;IS IT THE CTY ?
JRST INUS2 ;YES, ACCEPT CHAR AND PROCESS
JRST TYPE ;NO, ECHO CHAR ON FULL DUPLEX
;BEFORE PROCESSING IT
;HERE IF LINE NUMBER TOO BIG
SCNIN2: DATAO DLS,[EXP TDSABL] ;SET TRANSMIT DISABLE BIT AND OUTPUT IT
;(JUST INCASE, ELSE IT WILL INTERRUPT IMMEDIATELY AGAIN)
POPJ PDP, ;DISMISS INTERRUPT
;COMMON TO RECEIVE AND TRANSMIT.
INUSE: HRRZS DDB ;LINE DISABLED IF RH TTYTAB=-1
CAIN DDB,-1
POPJ PDP,
MOVE IOS,DEVIOS(DDB) ;SETUP IOS
CAIL LINE,TCONLN ;CTY OR PTY ?
JRST INUS2 ;YES
TLNE IOS,FULTWX ;IS THIS SELF ECHOEING FULL DUPLEX?
JRST INUS2 ;YES,(USER TYPED CONROL B)
HRL CHREC,LINE ;INSERT LINE NUMBER IN DATAO
TLO CHREC,USDRLN
TRZ CHREC,TDSABL
DATAO DLS,CHREC
DPB CHREC,PLASTC
POPJ PDP, ;DISMISS INTERRUPT
;ROUTINE TO OUTPUT A CHARACTER ON A LINE
;CALLED FROM TYP OR TYPL IN SCNSER
INTERNAL SCNTYP
IFNDEF FTPDP8,<FTPDP8==1> ;NORMALLY PDP-8'S ATTACHED TO SYSTEM
SCNTYP:
DLSTYP:
IFN FTPDP8,< EXTERNAL ECMTYP,ECONLN
CAIL LINE,ECONLN ;IS THIS AN EIGHT TTY
JRST ECMTYP ;YES>
HRL CHREC,LINE ;SET UP LINE NUMBER IN CHREC
TLO CHREC,USDRLN ;USE THAT AS DIRECTED LINE#
TRZ CHREC,TDSABL ;INSURE TRANSMISSION NOT DISABLED
DATAO DLS,CHREC ;OUT IT GOES
SKIPE DDB
DPB CHREC,PLASTC ;SAVE CHAR FOR FULL DUPLEX
POPJ PDP,
LIT
DLSEND: END