*DECK NVFIBOF
USETEXT TEXTNVF
USETEXT TXINNVF
USETEXT TEXTSS
PROC NVFIBOF;
# TITLE - BUILD OVERLAY FILE. #
BEGIN
#
** NVFIBOF - BUILD OVERLAY FILE.
*
* D. K. ENDO. 82/06/15.
* D. G. DEPEW. 82/06/25.
*
* THIS PROCEDURE INITIALIZES THE OVERLAY FILE BY LOADING THEM AND
* THEN WRITING THEM TO FILE *OVLFILE*.
*
* PROC NVFIBOF
*
* ENTRY 1. NONE.
*
* EXIT 1. *OVLFILE* BUILT
#
#
**** PROC NVFIBOF - XREF LIST.
#
XREF
BEGIN
PROC ABORT; # CAUSES ABORT WHEN CALLED #
PROC SSTRTS; # SS-RELEASE TABLE SPACE #
PROC LOADREQ; # ISSUES LOAD REQUEST #
PROC MOVEI; # MACREL - MOVE WORDS #
PROC MESSAGE; # SENDS MESSAGE TO THE DAYFILE #
PROC RECALL; # RETURNS CONTROL WHEN COMPLETE BIT SET #
PROC SSTSDA; # SET DYNAMIC ADDRESS #
PROC WRITER; # FLUSHES CIO BUFFER AND WRITES EOR #
END
#
****
#
DEF AAC$NAM # O"16260614010103" #; # A-A CONN OVLY (NVFLAAC) #
DEF AAI$NAM # O"16260614110120" #; # A-A OUTCALL OVLY (NVFLIAP) #
DEF AAR$NAM # O"16260614220120" #; # A-A INCALL OVLY (NVFLRAP) #
DEF AEP$NAM # O"16260614010520" #; # APPL/EVT OVLY (NVFLAEP) #
DEF OPC$NAM # O"16260614172003" #; # OPER CMD OVLY (NVFLOPC) #
DEF OPE$NAM # O"16260614172005" #; # OPER EVT OVLY (NVFLOPE) #
ITEM ADDLEN; # ADDITONAL LENGTH TO ADD TO OVERLAY #
ITEM FWA; # FIRST WORD ADDRESS TO LOAD THE OVERLAY #
ITEM LENGTH; # ADDITIONAL LEN OF OVLY #
ITEM TO; # ADDRESS TO WHERE #
ITEM I; # LOOP INDUCTION VARIABLE #
ITEM ODTORD ; # OVLY DEFINITION TABLE ORDINAL FOR EVLY #
#
* THIS ARRAY CONTAINS THE NAME OF THE OVERLAY TO BE LOADED.
#
ARRAY OVN [00:00] S(1);
BEGIN
ITEM OVN$NAM C(00,00,07);
ITEM OVN$NUM U(00,00,42);
END
#
* THIS BASED ARRAY IS USED TO DEFINE THE OUTCALL RECORD BASED ARRAY.
* IT ACTUALLY DEFINES THE POINTER WORD AND LENGTH WORD OF THE OUTCALL
* RECORD WHICH CONTAINS SEVERAL BLOCKS. THIS BASED ARRAY COINCIDES
* WITH THE OUTREC BASED ARRAY IN THE COMMON BLOCK "NVFOUT" IN THE
* TEXT TXOUTAA.
#
BASED ARRAY OCALL [00:00] S(1);
BEGIN
ITEM OCA$OUT U(00,00,60);# PTR TO OUTCALL RECORD #
ITEM OCA$OUTL U(01,00,60);# LEN OF OUTCALL RECORD #
END
#
* THIS BASED ARRAY DEFINES THE POINTER WORD AND LENGTH WORD OF THE
* INCALL RECORD. IT COINCIDES WITH THE INREC BASED ARRAY DEF IN THE
* TEXT TXINAA COMMON BLOCK NVFIN.
#
BASED ARRAY ICALL [00:00] S(2);
BEGIN
ITEM ICA$IN U(00,00,60);# LOC PTR OF INCALL RECORD #
ITEM ICA$INL U(01,00,60);# LEN OF THE INCALL RECORD #
END
CONTROL EJECT;
PROC GET$OVL;
# TITLE - GET OVERLAY. #
BEGIN
#
** GET$OVL - GET OVERLAY.
*
* D.K. ENDO 82/06/15
*
* THIS PROCEDURE DOES AN INITIAL LOAD OF AN OVERLAY TO BE PREPARED
* FOR WRITING TO THE OVERLAY FILE.
*
* PROC GET$OVL
*
* ENTRY 1. OVN$NAM[0] = OVERLAY NAME.
* 2. ADDLEN = ADDITIONAL LENGTH TO BE ADDED TO THE OVL
*
* EXIT 1. ODTORD = OVERLAY DEFINITION TABLE ORDINAL FOR THE
* OVERLAY LOADED.
*
#
ITEM DONE B; # MOVE MANAGED TABLES STATUS #
ITEM MEMSTAT I; # MEMORY REQUEST STATUS WORD #
ITEM NEED I; # TOTAL FIELD LENGTH NEEDED FOR LOAD #
#
* THIS ARRAY DEFINES THE MESSAGE SENT WHEN AN OVERLAY IS NOT FOUND.
#
ARRAY ONF$TXT [00:00] S(3);
BEGIN
ITEM ONF$NAME C(00,00,07);
ITEM ONF$MSG C(00,42,18) =[" OVERLAY NOT FOUND"];
ITEM ONF$ZBYT U(02,30,30) = [0];
END
#
* THIS ARRAY DEFINES THE OVERLAY PARAMETER BLOCK USED BY
* LOADREQ TO MAKE THE LOAD REQUEST.
#
ARRAY OPB [00:00] S(2);
BEGIN
ITEM OPB$NAME C(00,00,07);
ITEM OPB$WRD1 I(00,00,60);
ITEM OPB$LLL U(01,00,12);
ITEM OPB$LO B(01,17,01);
ITEM OPB$OLF B(01,18,01);
ITEM OPB$LWA U(01,24,18);
ITEM OPB$FWA U(01,42,18);
ITEM OPB$WRD2 I(01,00,60);
END
#
* SEARCH THE 5400 TABLE FOR THE OVERLAY NAME.
#
FOR ODTORD =0 STEP 1 WHILE OVN$NAM[0] NQ ODT$NAME[ODTORD ] AND
ODTORD LS EAC$DL[0]/2
DO
BEGIN
END
#
* IF FOUND, THEN GET THE OVERLAY.
#
IF ODTORD LS EAC$DL[0]/2
THEN
BEGIN
#
* COMPUTE THE SPACE NEEDED TO LOAD THE OVERLAY. IF NOT ENOUGH ROOM,
* THEN MOVE THE MANAGED TABLES UP TO MAKE ROOM. SET THE OVERLAY
* PARAMETER BLOCK. LOAD THE OVERLAY.
#
LENGTH = ODT$LWA[ODTORD ] - ODT$FWA[ODTORD ];
NEED = FWA + LENGTH + ADDLEN;
IF NEED GQ MEMLOC
THEN
BEGIN
SSTSDA(NEED,MEMSTAT,DONE);
FOR LENGTH=LENGTH WHILE NOT DONE
DO
BEGIN
RECALL(MEMSTAT);
SSTSDA(NEED,MEMSTAT,DONE);
END
END
OPB$WRD1[0] = 0;
OPB$WRD2[0] = 0;
OPB$LLL[0] = ODT$LVL[ODTORD ];
OPB$LO[0] = LDI$LB[0];
OPB$OLF[0] = TRUE;
OPB$LWA[0] = NEED;
OPB$FWA[0] = FWA;
IF OPB$LO[0]
THEN
BEGIN
OPB$NAME[0] = OVN$NAM[0];
END
ELSE
BEGIN
OPB$NAME[0] = LDI$NAME[0];
END
LOADREQ(OPB);
ODT$LWA[ODTORD ] = ODT$LWA[ODTORD ] + ADDLEN;
END
#
* IF OVERLAY IS NOT FOUND, SEND MESSAGE TO DAYFILE AND ABORT.
#
ELSE
BEGIN
ONF$NAME[0] = OVN$NAM[0];
MESSAGE(ONF$TXT,0);
ABORT;
END
END # GET$OVL #
CONTROL EJECT;
PROC WRITOVL;
# TITLE - WRITE OVERLAY. #
BEGIN
#
** WRITOVL - WRITE OVERLAY.
*
* D.K. ENDO 82/06/16
*
* THIS PROCEDURE WRITES A GIVEN OVERLAY OUT TO *OVLFILE* AND SAVES
* THE RANDOM SECTOR ADDRESS FOR THAT OVERLAY.
*
* PROC WRITOVL
*
* ENTRY 1. ODTORD = OVLY DEFINITION TBL ORDINAL FOR OVERLAY.
*
* EXIT 1. OVERLAY WRITTEN TO FILE *OVLFILE*.
* 2. RANDOM SECTOR ADDRESS IN ODT ENTRY.
*
#
#
* POINT THE FET TO THE OVERLAY TO BE WRITTEN.
#
OF$FIRST[0] = FWA;
OF$IN[0] = FWA + (ODT$LWA[ODTORD ] - ODT$FWA[ODTORD ]);
OF$OUT[0] = FWA;
OF$LIMIT[0] = OF$IN[0] + 1;
#
* SAVE THE CURRENT RANDOM SECTOR ADDRESS.
#
ODT$PRU[ODTORD ] = OF$CRI[0];
#
* WRITE THE OVERLAY OUT TO THE FILE.
#
WRITER(OVLFET,0);
RECALL(OVLFET);
END # WRITOVL #
CONTROL EJECT;
#
* MAIN ROUTINE BEGINS HERE.
*
* POINT THE ODT BASED ARRAY TO THE OVERLAY ENTRIES IN THE 5400 TABLE
* OF THE (0,0) OVERLAY. CALCULATE THE LWA+1 OF THE (77,00)OVERLAY.
* INITALIZE THE OVLFILE FET. INITIALIZE THE OVERLAY REQUEST COUNT
* AND THE OVERLAY REQUEST TABLE.
#
P<LDRINFO> = O"64";
P<EACPM> = O"100";
P<ODT> = P<EACPM> + 8 + EAC$NEP[0];
FOR I=0 STEP 1 WHILE ODT$LVL[I] NQ O"7700" AND
I LS EAC$DL[0]/2
DO
BEGIN
END
IF I LS EAC$DL[0]/2
THEN
BEGIN
FWA = ODT$LWA[I];
END
OF$LFN[0] = "OVLFILE";
OF$CODE[0] = 3;
OF$R[0] = TRUE;
OF$L[0] = 2;
OF$CRI[0] = 1;
#
* CLEAR THE COUNT OF OVERLAY REQUESTS AND THE OVERLAY REQUEST
* TABLE. SET THE WORKLIST NUMBER TO BE USED BY THE SERVICES AND
* SCHEDULING OVERLAY ROUTINES FOR EXECUTING OVERLAYS.
#
ORC = 0;
FOR I=0 STEP 1 UNTIL NODT$
DO
BEGIN
ORT$WORD[I] = 0;
END
SSOEOPW = WWDF"SOEOP";
#
* GET THE A-A CONNECTION OVERLAY. WRITE IT OUT TO THE OVERLAY FILE.
#
OVN$NUM[0] = AAC$NAM;
ADDLEN = 0;
GET$OVL;
WRITOVL;
#
* GET THE APPLICATION/EVENT OVERLAY. WRITE IT OUT THE OVERLAY FILE.
#
OVN$NUM[0] = AEP$NAM;
ADDLEN = 0;
GET$OVL;
WRITOVL;
#
* GET THE COMMAND PROCESSOR OVERLAY. WRITE IS OUT TO THE OVERLAY
* FILE.
#
OVN$NUM[0] = OPC$NAM;
ADDLEN = 0;
GET$OVL;
WRITOVL;
#
* GET THE OPERATOR EVENT OVERLAY. WRITE IT OUT TO THE OVERLAY FILE.
#
OVN$NUM[0] = OPE$NAM;
ADDLEN = 0;
GET$OVL;
WRITOVL;
#
* GET THE A-A OUTCALL REQUEST PROCESSING OVERLAY. WRITE IT OUT TO
* THE OVERLAY FILE.
#
OVN$NUM[0] = AAI$NAM;
ADDLEN = OUTSMQL;
GET$OVL;
#
* POINT THE 5400 TABLE TO END OF 77,0 OVERLAY.
* POINT THE OUTCALL RECORD TO LABELLED COMMON AND THEN MOVE THE
* OUTCALL RECORD FROM THE OUTSMQ TO THE LABELLED COMMON.
#
P<EAHPM> = FWA;
P<OCALL> = FWA + 4 + EAH$NEP[0];
OCA$OUT[0] = LOADBASE + LENGTH;
OCA$OUTL[0] = OUTSMQL;
IF OUTSMQL NQ 0
THEN
BEGIN
TO = FWA + LENGTH;
MOVEI(OUTSMQL,P<OUTSMQ>,TO);
SSTRTS(P<OUTSMQ>,0,OUTSMQL);
END
WRITOVL;
#
* GET THE INCALL REQUEST PROCESSING OVERLAY.
* CALCULATE THE ADDED LENGTH NEEDED TO APPEND THE INCALL
* RECORD TO THE OVERLAY. INITIALIZE THE POINTER ADDRESS
* AND LENGTH VARIABLES IN THE LABELLED COMMON BLOCK NVFIN.
* WRITE THE OVERLAY TO THE OVERLAY FILE.
#
OVN$NUM[0] = AAR$NAM;
ADDLEN = INSMQL;
GET$OVL;
P<EAHPM> = FWA;
P<ICALL> = FWA + 4 + EAH$NEP[0];
ICA$IN[0] = LOADBASE + LENGTH;
ICA$INL[0] = INSMQL;
IF INSMQL NQ 0
THEN
BEGIN
TO = FWA + LENGTH;
MOVEI(INSMQL,P<INSMQ>,TO);
SSTRTS(P<INSMQ>,0,INSMQL);
END
WRITOVL;
END # NVFIBOF #
TERM