Trailing-Edge
-
PDP-10 Archives
-
dec-10-omona-u-mc9
-
d8sint.mac
There are 6 other files named d8sint.mac in the archive. Click here to see a list.
TITLE D8SINT - INTERRUPT SERVICE ROUTINE FOR DN87S - V006
SUBTTL ERIC WERME/EJW 30 NOV 76
SEARCH F,S,DTEPRM
$RELOC
$HIGH
;***COPYRIGHT 1976,1977 DIGITAL EQUIPMENT CORP., MAYNARD, MASS.***
XP VD8SINT,006 ;VERSION NUMBER
ENTRY D8SINT ;REFERENCED IN COMNET TO FORCE LOADING
D8SINT:
COMMENT \
THIS MODULE IS MEANT TO BE A CARBON COPY OF D85INT, THE DL10/NETSER
INTERFACE. SINCE D85INT IS ORIENTED
AROUND SINGLE MESSAGE TRANSFERS, SO IS D8SINT EVEN THOUGH DTESER IS
WILLING TO QUEUE ANY NUMBER OF MESSAGES.
\
;UNUSED FRONTEND ROUTINES:
D8SONC==:CPOPJ##
D8SSEC==:CPOPJ##
;LOCAL SYMBOLS:
D8.INP==1B0 ;SET IN FEKUNI WHEN EXPECTING INPUT
D8.OUT==1B1 ;SET IN FEKUNI WHEN DOING OUTPUT
LN.MOR==1B17 ;LINE NUMBER BIT SAYING ANOTHER FRAGMENT IS COMING
;ROUTINE CALLED WHEN NETSER IS WILLING TO ACCEPT A SINGLE MESSAGE.
;CALL:
;J/ FEK ADDRESS
;FEKIAD(J) PCB ADDRESS THAT POINTS TO MESSAGE AREA
D8SRDD::PUSHJ P,SAVE4## ;NEED ALL THE PERM. ACS
MOVE W,FEKUNI##(J) ;GET DTK ADDRESS
MOVSI T1,(D8.INP) ;MAKE SURE WE AREN'T ALREADY EXPECTING
TDNE T1,FEKUNI##(J) ; A MESSAGE
STOPCD .+1,DEBUG,RIP, ;++ READ IN PROGRESS
IORM T1,FEKUNI##(J) ;NOW WE EXPECT ONE
MOVE U,FEKIAD##(J) ;HUNT DOWN BYTE POINTER TO MESSAGE AREA
MOVE T1,PCBIAD##(U) ;GET POINTER
MOVEM T1,DTKIBP##(W) ;SAVE TO PASS TO DTESER LATER
HLLZS PCBICT##(U) ;INITIALIZE MESSAGE LENGTH TO 0
AOSN DTKARC##(W) ;IF THIS DOESN'T SKIP, THEN UUO LEVEL ISN'T SENDING
PJRST SNDACK ; A DATA MESSAGE. WE CAN SEND AN ACK NOW SAFELY
POPJ P, ;UUO LEVEL BUSY - IT WILL SEND ACK WHEN DONE
;ROUTINE TO QUEUE OUT A MESSAGE TO A DN87. ONLY ONE AT A TIME MAY
;BE SENT, NETSER WILL BE NOTIFIED AT FEKINT WHEN THE MESSAGE HAS BEEN
;SENT
;CALL:
;J/ FEK ADDRESS
;FEKOAD(J) PCB ADDRESS OF MESSAGE
;USES U, T1-T4
D8SWRT::PUSHJ P,SAVE4## ;NEED THESE TO TALK TO DTESER
PUSH P,S ;SAVE SINCE UUO LEVEL CODE GETS HERE
MOVE W,FEKUNI##(J) ;POINT TO THIS 87'S DTK
HRRZ U,FEKOAD##(J) ;POINT TO MESSAGE'S PCB
MOVSI T1,(D8.OUT) ;GET OUTPUT IN PROGRESS FLAG
TDNE T1,FEKUNI##(J) ;WHICH SHOULD BE CLEAR NOW
STOPCD .+1,DEBUG,OIP, ;++ OUTPUT IN PROGRESS
IORM T1,FEKUNI##(J) ;IT IS NOW
MOVSI S,T11DON ;POST ADDRESS FOR WHEN MESSAGE IS DONE
HRRZ P1,DTKUNI##(W) ;GET DTE # TO SEND MESSSAGE TO
MOVE P2,[.EMNCL,,EM.IND!.EMSTR] ;SEND INDIRECT STRING DATA
HRRZ P3,PCBOCT##(U) ;LENGTH
MOVE P4,PCBOAD##(U) ;ADDRESS OF MESSAGE
AOS DTKARC##(W) ;DON'T LET D8SRDD SEND ACK BETWEEN FRAGMENTS
SKIPN PCBOC2##(U) ;IS THERE SOME USER DATA?
JRST D8SWR2 ;NO, JUST SEND THIS PIECE
HRLI P3,(LN.MOR) ;TELL -11 THERE IS MORE TO COME
PUSHJ P,DTEQUE## ;SEND IT
JRST WRTPNT ;ABORT THIS WRITE
LDB T1,PCBPCV## ;GET COMPRESSION CODE
HRRZ P3,PCBOC2##(U) ;GET USER DATA MESSAGE LENGTH
CAIE T1,PCV.BN## ;BINARY DATA? (WORD MODE NEEDED)
JRST D8SWR1 ;NO, NOTHING FUNNY
LSH P3,1 ;MAKE # OF -11 BYTES
IORI P2,EM.16B ;REQUEST WORD MODE TRANSFER
D8SWR1: DPB T1,[POINT 2,P3,16] ;SAVE COMPRESSION IN LINE # FIELD
MOVE P4,PCBOA2##(U) ;AND LOCATION (IN EVM!!!)
D8SWR2: PUSHJ P,DTEQUE## ;SEND IT, CONTINUE BELOW WHEN SENT
JRST WRTPNT
PUSHJ P,CHKACK ;DECREMENT DTKARC AND SEND ACK IN NECESSARY
SPOPJ: POP P,S ;RESTORE S
POPJ P,
WRTPNT: PUSHJ P,CHKACK ;JUST 'CAUSE WE'RE FOULED UP, DON'T FOULUP INPUT
MOVSI T1,(D8.OUT) ;TURN OFF OUTPUT DONE EXPECTED
ANDCAM T1,FEKUNI##(J) ;THIS CODE REALLY SHOULD BE FIXED....
JRST SPOPJ ;'CAUSE IT DOESN'T WORK IF 1 OF 2 FRAGMENTS WENT OUT
;HERE AFTER DTESER HAS SUCCESSFULLY TRANSMITTED THE MESSAGE
T11DON: MOVE J,DTEFEK##(P1) ;GET FEK ADDRESS
HRRZ U,FEKOAD##(J) ;IF WE JUST DIED, WE WON'T HAVE A PCB
PJUMPE U,CPOPJ## ;IN WHICH CASE NETSER DOESN'T WANT TO HEAR FROM US
MOVSI T1,(D8.OUT) ;MAKE SURE WE'RE EXPECTING THIS
TDNN T1,FEKUNI##(J)
STOPCD .+1,DEBUG,UOD, ;++ UNEXPECTED OUTPUT DONE
TLNE P3,(LN.MOR) ;WAS THAT ONLY PART?
POPJ P, ;YES, DON'T TELL NETSER UNTIL WHOLE THING IS OUT
ANDCAM T1,FEKUNI##(J) ;NO LONGER EXPECTING IT
HRLI J,FI.OUD## ;TELL NETSER THAT OUTPUT WAS DONE AND
PJRST FEKINT## ; THAT WE WANT ANOTHER MESSAGE
;HERE WHEN D8SWRT HAS SENT ALL THE FRAGMENTS OF THE NCL MESSAGE IT CAN SO
;IT IS NOW SAFE TO SEE IF THE INTERRUPT CODE (D8SRDD) WANTED TO SEND
;AN ACK TO REQUEST ANOTHER MESSAGE. IT CANNOT DO SO BETWEEN THE TIME WE
;SEND THE FIRST AND LAST FRAGMENTS BECAUSE THE ACK WILL LOOK LIKE A
;MESSAGE TERMINATION AND THE NEXT DATA FRAGMENT WILL LOOK LIKE THE START
;OF AN NCL MESSAGE.
CHKACK: SOSGE DTKARC##(W) ;THIS SKIPS IFF D8SRDD DID ITS AOS
POPJ P, ;IT DIDN'T, SO WE DON'T HAVE TO SEND AN ACK
SNDACK: SETOM DTKARC##(W) ;RESET SEMAPHORE FROM 0
MOVSI S,CPOPJ## ;DON'T NEED TO KNOW IT'S SENT
HRRZ P1,DTKUNI##(W) ;GET DTE # TO SEND MESSAGE THROUGH
DMOVE P2,[.EMNCL,,.EMACK ;SEND AN ACK
2] ;AND 2 BYTES DATA
SETZ P4, ;SNEAKY WAY TO SEND 0 DATA
PUSHJ P,DTEQUE## ;NO, JUST SEND THIS PIECE
PJRST DEAD87 ;NEED BETTER CODE - CALL IT DEAD FOR NOW
POPJ P,
;TO CPOPJ WHEN SENT
;TO DTESTR WHEN THE MESSAGE DOES ARRIVE
;ROUTINE CALLED WHEN DTESER DISCOVERS ANOTHER -11 IS UP. IF THAT
;-11 HAS A FEK BLOCK, THEN IT IS A DN87S AND NETSER WILL BE TOLD ABOUT IT.
NCLUP:: SKIPN J,DTEFEK##(P1) ;DOES THIS -11 HAVE A FEK?
POPJ P, ;NOPE, DON'T WORRY ABOUT IT
HLRM J,FEKUNI##(J) ;REMEMBER WHICH DTK IS ASSOCIATED WITH FEK
MOVSI T1,(D8.INP!D8.OUT) ;NO LONGER EXPECTING INPUT OR OUTPUT
ANDCAM T1,FEKUNI##(J)
MOVSI T1,FK.ONL## ;SET ONLINE FLAG FOR NETSER'S ONCE PER
IORM T1,FEKBLK##(J) ; SECOND CODE WHICH WILL START THINGS UP
POPJ P,
;ROUTINE CALLED FROM DTESER WHEN THE -11 ENTERS SECONDARY PROTOCOL
;WHICH ONLY HAPPENS WHEN IT IS BEING RELOADED.
;DEAD87 IS CALLED FROM SNDACK WHEN IT CAN'T SEND ONE
NCLDWN::SKIPN J,DTEFEK##(P1) ;DOES THIS -11 HAVE A FEK?
POPJ P, ;NOPE, NETSER WON'T BE INTERESTED
DEAD87: PUSH P,F ;SAVE ETD ADDRESS FROM DTESER
HRLI J,FI.DWN## ;TELL NETSER THAT SOMEONE DIED
PUSHJ P,FEKINT##
PJRST FPOPJ## ;RESTORE F BEFORE RETURNING TO DTESER
;TO-10 DISPATCH TABLE
CPOPJ## ;(-1) LOST TO -10 IN DIRECT MESSAGE
NCLDSP::EATMSG## ;(0)
EATMSG## ;
EATMSG## ;
D8SSTR ;(3) HERE IS STRING DATA
EATMSG## ;
EATMSG## ;
EATMSG## ;
EATMSG## ;
EATMSG## ;(10)
EATMSG## ;
EATMSG## ;
EATMSG## ;
EATMSG## ;
EATMSG## ;
EATMSG## ;
EATMSG## ;
EATMSG## ;(20)
EATMSG## ;
EATMSG## ;
EATMSG## ;
EATMSG## ;
EATMSG## ;
;ROUTINE TO HANDLE INCOMING STRING DATA MESSAGE. HERE WHEN HEADER
;HAS ARRIVED.
D8SSTR: SKIPN J,DTEFEK##(P1) ;GET FEK ADDRESS FOR THIS DTE
PJRST EATMSG## ;IGNORE IF WE DON'T THINK IT IS A DN87S
MOVE W,FEKUNI##(J) ;GET THE DTK FOR THIS -11
HRRZ U,FEKIAD##(J) ;GET THE PCB WE'RE SUPPOSED TO BE FILLING
MOVSI T1,(D8.INP) ;MAKE SURE WE'RE EXPECTING THIS
TDNN T1,FEKUNI##(J) ; (BIT WAS SET BY NETRDD)
PJRST EATMSG## ;NOT EXPECTING IT, DISCARD IT
MOVSI S,T10DON ;POST ADDRESS FOR WHEN DATA COMES IN
MOVE P4,DTKIBP##(W) ;TELL DTESER WHERE TO PUT MESSAGE
MOVEI T1,(P3) ;ISOLATE LENGTH
ADDM T1,PCBICT##(U) ;TELL NETSER LENGTH OF MESSAGE
ADJBP T1,DTKIBP##(W) ;READY POINTER FOR NEXT MESSAGE
MOVEM T1,DTKIBP##(W) ;AND REMEMBER IT
POPJ P, ;RETURN TO HAVE DTESER XFER INDIRECT PORTION
;CONTINUE AFTER HERE WHEN DATA IS IN
T10DON: SKIPN J,DTEFEK##(P1) ;GET FEK ADDRESS AGAIN
POPJ P, ;I MET A MAN WHO WASN'T THERE...
MOVSI T1,(D8.INP) ;BETTER MAKE SURE WE'RE EXPECTING THIS
TDNN T1,FEKUNI##(J)
STOPCD .+1,DEBUG,UID, ;++ UNEXPECTED INPUT DONE
TLNE P3,(LN.MOR) ;MORE TO COME?
POPJ P, ;YES, DON'T TELL NETSER TIL ALL IN
ANDCAM T1,FEKUNI##(J) ;CLEAR IT SINCE NO LONGER EXPECTING
HRLI J,FI.IND## ;FLAG FOR INPUT DONE
PJRST FEKINT## ;AND TELL NETSER WE HAVE A MESSAGE
$LIT
END