Trailing-Edge
-
PDP-10 Archives
-
BB-H137A-BM
-
uetp/lib/rcve.mac
There is 1 other file named rcve.mac in the archive. Click here to see a list.
TITLE RCVE
;COPYRIGHT (C) 1977 BY
;DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
;
;
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
;ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
;INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
;COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
;OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
;TRANSFERRED.
;
;
;THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
;AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
;CORPORATION.
;
;DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
;SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
SEARCH MONSYM,MACSYM
SALL
; ACCUMULATOR DEFINITIONS
F=0
T1=1
T2=2
T3=3
T4=4
Q1=5
Q2=6
Q3=7
P1=10
P2=11
P3=12
P4=13
P5=14
P6=15
CX=16
P=17
PAGE
SUBTTL IPCF -INITIALIZATION
; INITIALIZE THE P REGISTER FOR PUSHJ POPJ
START: MOVEM T1,P1 ;POINTER TO AND COUNT FOR FREE PAGE POOL
MOVEM T1,P2 ;USET TO RE-INIT <-CNT,,POINTER>
MOVE P,[-50,,PDL] ;UP TO 50 STACKED CALLS IN PDL
;INITIALIZE OUR PID
MOVEI T1,.MUCRE ;PARM FOR THE PID CREATE
MOVEM T1,IPCOM ;PLACE IN CONTROL BLOCK
MOVE T1,[<IP%JWP>B18,,.FHSLF] ;MAKE OUT PID JOB WIDE
MOVEM T1,IPCOM+1 ;PLACE IN CONTROL BLOCK
MOVEI T1,3 ;TWO WORD PARM
MOVEI T2,IPCOM ;ADDR OF PARM CONTROL BLOCK
MUTIL ; JSYS-IPCF UTILITY- UP PID
PUSHJ P,ERABRT ;ERROR - TYPE MSG AND ABORT
MOVE T1,IPCOM+2 ;LOAD THE JUST CREATED PID
MOVEM T1,OURPID ;AND SAVE PERMANENTLY
; GET <SYSTEM>INFO PID
MOVEI T1,.MUGTI ;FUNCTION TO GET <SYSTEM>INFO PID
MOVEM T1,IPCOM ;PLACE IN CONTROL BLOCK
MOVE T1,OURPID ;GET OUR PID FOR IDENTIFICATION
MOVEM T1,IPCOM+1
MOVEI T1,3 ;TWO WORD PARM
MOVEI T2,IPCOM ;ADDRESS OF PARM CONTROL BLOCK
MUTIL ;JSYS- GET <SYSTEM>INFO PID
PUSHJ P,ERABRT ;ERROR - TYPE MSG AND ABORT
MOVE T1,IPCOM+2 ;LOAD THE <SYSTEM>INFO PID
MOVEM T1,SYSPID ;SAVE IN PERMANENT STORAGE
; ASSIGN "UETP-SWITCH-DIRECTORY" TO OURPID
MOVEI Q1,IPCOM ;ADDR OF <SYSTEM>INFO COMMUNIC. BLOCK
MOVEI T1,.IPCII ;WE'RE ASSIGNING OUR PID A NAME
MOVEM T1,.IPCI0(Q1) ;PLACE FUNCTION CODE INTO CONTROL BLK
SETZM .IPCI1(Q1) ;INDICATE NO DUPLICATE MSG'S SENT
HRROI T1,.IPCI2(Q1)
HRROI T2,[ASCIZ/UETP-SWITCH-/]
SETZ T3,
SOUT
MOVE Q2,T1 ;SAVE STRING POINTER
HRROI T1,-1 ;NOW GET DIRECTORY NUMBER WHICH
MOVE T2,[-1,,4] ;WILL GIVE US THE DIRECTORY NAME
MOVEI T3,.JIDNO
GETJI
PUSHJ P,ERABRT
MOVE T1,Q2 ;POINTER FOR WHERE IT'S GOING IN MSGBUF
MOVE T2,T4 ;T4 HAS DIRECTORY NUMBER IN IT
DIRST ;GO TRANSLATE DIRECTORY NUM TO DIR NAME
PUSHJ P,ERABRT
; <SYSTEM>INFO CHECKS FOR A DIRECTORY STRING - THIS CAUSES PROBLEMS ON
; MULTIPLE STRUCTURES. GET RID OF THE < OR [
MOVE T2,[POINT 7,IPCOM+.IPCI2] ;POINT TO STRING
CHKMOR: ILDB T1,T2 ;GET BYTE
CAIN T1,"<" ;START OF DIRECTORY?
JRST CHKDON ;YES - GET RID OF IT
CAIE T1,"[" ;THIS IS A LEGAL DIRECTORY STARTER
JRST CHKMOR ;NOT YET - KEEP LOOKING
CHKDON: MOVEI T1,"-" ;TAKE SOME RANDOM CHARACTER
DPB T1,T2 ;AND DEPOSIT IT
MOVE T1,[IPCOML,,IPCOM] ;PASS ADDRESS TO SUBROUTINE
PUSHJ P,SYSEND ;SEND <SYSTEM>INFO THE CONTROL BLOCK
; IF 'UETP-SWITCH' IS A DUPLICATE PID THEN WE'LL IN TROUBLE
PUSHJ P,SYSRCV ;GO RECIEVE THE ANSWER FROM <SYSTEM>INFO
MOVE T1,PDB ;GET <SYSTEM>INFO RESPONSE FLAGS
ANDI T1,IP%CFE ;ISOLATE ERROR CODES
JUMPE T1,RCVE ;JUMP TO RCVE IF NAME WAS OK
; HERE IF WE'RE NOT 'UETP-SWITCH' TO FIND OUT WHY
PUSHJ P,ERCODE ;ERROR - ABORT
SUBTTL RECIEVE INITIALIZATION
RCVE: SETZM RCVCNT ;ZERO THE RECIEVE COUNT
;ASSOCIATE CHANNEL 32 WITH IPCF MSG'S, 30 WITH CORE FREE
MOVEI T1,.FHSLF ;OUR HANDLE...
MOVE T2,[LEVTAB,,CHNTAB] ;LEVEL AND CHANNEL TABLE ADDRESSES
SIR ;TELL SYSTEM
EIR ;ENABLE THEM
MOVE T2,[1B32!1B30] ;ACTIVATE THE CHANNELS
AIC ;TELL SYSTEM ABOUT IT
MOVE T1,[^D32] ;TELL IPCF IT'S 32
MOVEM T1,IPCOM+2 ;INTO CONTROL BLOCK
MOVE T1,OURPID ;IDENTIFY OURSELVES WITH OUR PID
MOVEM T1,IPCOM+1 ;INTO CONTROL BLOCK
MOVEI T1,.MUPIC ;FUNCTION TO ASSIGN INTERRUPTS
MOVEM T1,IPCOM ;INTO CONTROL BLOCK
MOVEI T2,IPCOM ;ADDRESS OF CONTROL BLOCK FOR JSYS
MOVEI T1,3 ;LENGTH OF CONTROL BLOCK
MUTIL ;JSYS - GO ASSIGN INTERRUPT CHANNEL
PUSHJ P,ERABRT ;ERROR - GO TYPER ERROR MSG AND ABORT
MOVEI T1,.MUENB ;FUNCTION TO ENABLE INTERRUPTS FOR IPCF
MOVEM T1,IPCOM ;PLACE IN CONTROL BLOCK
MOVEI T2,IPCOM ;ADDRESS FOR JSYS
MOVEI T1,3 ;NUMBER OF WORDS IN CONTROL BLOCK
MUTIL ;JSYS - GO ENABLE THE IPCF INTERRUPTS
PUSHJ P,ERABRT ;ERROR - GO TYPE MSG AND ABORT
CALL AOKCHK ;TELL SHIPPR WE'RE OK
WAIT ;WAIT FOR MESSAGE
; RECIEVE MESSAGE INTERRUPT HERE
RCIPCF: MOVE T1,[.MUQRY] ;QUERY ABOUT THE MESSAGE
MOVEM T1,PDB-1 ;INTO COMMUNICATION BLOCK
MOVE T1,OURPID ;IDENTIFY OURSELVES
MOVEM T1,PDB ;INTO THE COMMUNICATION BLOCK
MOVEI T1,10 ;LENGTH OF BLOCK
MOVEI T2,PDB-1 ;ADDRESS OF PARM BLOCK
MUTIL ;JSYS - ASK ABOUT PACKET ON QUEUE
DEBRK ;WAIT FOR MESSAGES
; GET MESSAGE OFF QUEUE
CALL GTPAGE ;GET A PAGE FOR THE IPCF MSG
HRRZ T4,T1 ;SET-UP THE .IPCFP WORD FOR PAGE IPCF
IDIVI T4,1000 ;MAKE FULL ADDRESS INTO PAGE NUMBER
HRLI T4,1000 ;LENGTH OF MSG IF A PAGE
HLL T1,PDB+.IPCFP ;ADD THE LENGTH FIELD FOR NON-PAGE IPCF
MOVE T2,PDB ;GET BIT TELLING US SIZE OF MSG
TXNE T2,IP%CFV ;SKIP IF IT IS NOT A PAGE LENGTH MESSAGE
MOVE T1,T4 ;PAGE THEN T4 HAS PROPER .IPCFP
MOVEM T1,PDB+.IPCFP ;PUT IN PDB
MOVEI T1,6 ;LENGTH OF CONTROL BLOCK
MOVEI T2,PDB ;ADDRESS OF PARM BLOCK
MRECV ;JSYS - GET TME MESSAGE
PUSHJ P,ERABRT ;ERROR - TYPE MSG AND ABORT
MOVE T1,PDB+.IPCFL ;GET THE ERROR FLAGS
AND T1,[IP%CFE] ;ISOLATE THEM
SKIPE T1 ;ANY ERROR IS FATAL
PUSHJ P,ERCODE ;GO PRINT ERROR CODE
; UPDATE COUNTER AND NOTIFY SUPERIOR
CALL BZYPAG ;GO MARK PAGE FULL
MOVEI T1,.FHSUP ;WE WILL INTERRUPT SUPERIOR
MOVE T2,[1B28] ; ON CHAN 28 TO START WRITING PAGE OUT
IIC ;NOTIFY THE SUPERIOR (SHIPPR)
AOS RCVCNT ;ADD