cdc:nos2.source:nam5871:csibof
Table of Contents
CSIBOF
Table Of Contents
- [00004] PROC CSIBOF
- [00005] BUILD OVERLAY FILE.
- [00008] BUILD OVERLAY FILE.
- [00034] PROC MOVEI
- [00035] PROC RECALL
- [00036] PROC REWIND
- [00102] PROC GET$OVL
- [00103] GET OVERLAY.
- [00127] PROC ABORT
- [00128] PROC LOADREQ
- [00129] PROC MESSAGE
- [00130] PROC RECALL
- [00131] PROC SSTSDA
- [00251] PROC WRITOVL
- [00252] WRITE OVERLAY.
- [00275] PROC RECALL
- [00276] PROC WRITER
Source Code
- CSIBOF.txt
- *DECK CSIBOF
- USETEXT TEXTCS
- USETEXT TEXTSS
- PROC CSIBOF;
- # TITLE - BUILD OVERLAY FILE. #
- BEGIN
- #
- ** CSIBOF - BUILD OVERLAY FILE.
- *
- * D.K. ENDO 82/06/15
- * A. LIM 82/06/24
- *
- * THIS PROCEDURE INITIALIZES THE OVERLAY FILE BY LOADING THEM AND
- * THEN WRITING THEM TO FILE *OVLFILE*.
- * IT MOVES ALL THE CROSS REFERENCE TABLES NEEDED FOR THE OVERLAY
- * FROM THE MANAGED AREA TO BLANK COMMON BEFORE IT WRITES THE
- * OVERLAY OUT TO FILE *OVLFILE*.
- *
- * PROC CSIBOF
- *
- * ENTRY 1. NONE.
- *
- * EXIT 1. *OVLFILE* BUILT
- *
- #
- #
- **** PROC CSIBOF - XREF LIST BEGINS.
- #
- XREF
- BEGIN
- PROC MOVEI; # MACREL - MOVE INDIRECT BLOCK OF CM WORDS#
- PROC RECALL; # RETURNS CONTROL WHEN COMPLETE #
- PROC REWIND; # REWINDS A FILE #
- END
- #
- ****
- #
- DEF CMP$NAM # O"03231403152000" #; # CMD PROCESSOR (CSLCMP)#
- DEF CMR$NAM # O"03231403152200" #; # CMD RECOGNIZER(CSLCMR)#
- DEF EVT$NAM # O"03231405262400" #; # EVENT OVLY (CSLEVT) #
- DEF OIO$NAM # O"03231417111700" #; # OPERATOR I/O (CSLOIO #
- DEF OSS$NAM # O"03231417232300" #; # OPERATOR SUP (CSLOSS) #
- DEF XRFSIZ$ # 8 #; # XRF SIZE = 4 TABLES X 2 #
- ITEM ADDLEN; # ADDITONAL LENGTH TO ADD TO OVERLAY #
- ITEM FWA; # FIRST WORD ADDRESS TO LOAD THE OVERLAY #
- ITEM I; # LOOP INDUCTION VARIABLE #
- ITEM LENGTH I; # LENGTH OF OVERLAY TO BE LOADED #
- ITEM TO U; # FWA OF MOVE TO BLOCK #
- 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
- #
- * XRF - CROSS REFERENCE INFORMATION TABLE.
- *
- * THIS BASED ARRAY DEFINES THE POINTER WORD AND LENGTH PAIR
- * OF EACH CROSS REFERENCE TABLE NEEDED BY ALL THE CS OVERLAYS.
- * IT ALWAYS POINTS TO THE LABELLED COMMON BLOCK OF BASED ARRAY
- * POINTER WORD AND LENGTH OF ALL CS CROSS REFERENCE TABLES, AND
- * THIS BLOCK IS ALWAYS THE FIRST BLOCK IN ANY OVERLAY.
- * THIS TABLE MUST MATCH THE *CSXRF* DEFINITIONS IN *TEXTOV*.
- * ANY CHANGE TO THIS ARRAY OR TO *CSXRF* MUST CAUSE A COMPARABLE
- * CHANGE TO THE OTHER. SERIOUS CIRCUMSTANCES MAY OCCUR OTHERWISE.
- #
- BASED ARRAY XRF[00:00] S(XRFSIZ$);
- BEGIN
- ITEM XRF$DEX U(00,00,60); # DEVICE XREF TABLE #
- ITEM XRF$DEXL U(01,00,60); # LENGTH OF DEX TABLE #
- ITEM XRF$LIX U(02,00,60); # LINE XREF TABLE #
- ITEM XRF$LIXL U(03,00,60); # LENGTH OF LIX TABLE #
- ITEM XRF$LLXR U(04,00,60); # LOGICAL LINK XREF TABLE #
- ITEM XRF$LLXRL U(05,00,60); # LENGTH OF LLXR TABLE #
- ITEM XRF$PLXRF U(06,00,60); # PHYICAL LINK XREF TABLE #
- ITEM XRF$PLXRFL U(07,00,60); # LENGTH OF PLXREF TABLE #
- 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.
- *
- #
- #
- * PROC GET$OVL - XREF LIST BEGINS.
- #
- XREF
- BEGIN
- PROC ABORT; # CAUSES ABORT WHEN CALLED #
- PROC LOADREQ; # ISSUES LOAD REQUEST #
- PROC MESSAGE; # SENDS MESSAGE TO THE DAYFILE #
- PROC RECALL; # RETURNS CONTROL WHEN COMPLETE BIT SET #
- PROC SSTSDA; # SET DYNAMIC ADDRESS #
- END
- #
- *
- #
- 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
- CONTROL EJECT;
- # #
- # GET$OVL CODE BEGINS HERE #
- # #
- #
- * 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
- RETURN; # **** RETURN **** #
- END
- 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.
- *
- #
- #
- * PROC WRITOVL - XREF LIST BEGINS.
- #
- XREF
- BEGIN
- PROC RECALL; # RETURNS CONTROL WHEN COMPLETE BIT IS SET#
- PROC WRITER; # FLUSHES CIO BUFFER AND WRITES EOR #
- END
- #
- *
- #
- # #
- # WRITOVL CODE BEGINS HERE #
- # #
- #
- * 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);
- RETURN; # **** RETURN **** #
- END # WRITOVL #
- CONTROL EJECT;
- # #
- # CSIBOF CODE 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] = OFSIZ$ - 5;
- OF$CRI[0] = 1;
- OF$FIRST[0] = FWA;
- OF$IN[0] = FWA;
- OF$OUT[0] = FWA;
- OF$LIMIT[0] = FWA + O"100";
- ORC = 0;
- FOR I=0 STEP 1 UNTIL NODT$
- DO
- BEGIN
- ORT$WORD[I] = 0;
- END
- SSOEOPW = CSWDF"SOEOP";
- REWIND(OVLFET);
- RECALL(OVLFET);
- #
- * GET THE EVENT OVERLAY. CALCULATE THE TOTAL LENGTH NEEDED TO LOAD
- * ITS CROSS REFERENCE TABLES, WHICH ARE: LIX, LLXR, AND
- * PLXREF. LOAD THE OVERLAY, THEN MOVE ONE TABLE AT A TIME TO THE
- * END OF THE OVERLAY. INITIALIZE THE POINTER ADDRESS AND LENGTH OF
- * THE TABLE DEFINED IN LABELLED COMMON BLOCK *CSXRF*.
- * THEN WRITE IT OUT THE OVERLAY FILE.
- #
- OVN$NUM[0] = EVT$NAM;
- ADDLEN = LIXLS + LLXREFLS + PLXREFLS;
- GET$OVL;
- P<EAHPM> = FWA; # POINT 5400 TABLE AT END OF 77,0 OVL #
- P<XRF> = FWA + 4 + EAH$NEP[0]; # POINT XRF TO LABELLED COMMON #
- XRF$LIX[0] = LOADBASE + LENGTH; # LIX TABLE #
- XRF$LIXL[0] = LIXLS;
- TO = FWA + LENGTH;
- MOVEI(LIXLS, P<LIXS>, TO);
- XRF$LLXR[0] = XRF$LIX[0] + XRF$LIXL[0]; # LLXR TABLE #
- XRF$LLXRL[0] = LLXREFLS;
- TO = TO + XRF$LIXL[0];
- MOVEI(LLXREFLS, P<LLXRS>, TO);
- XRF$PLXRF[0] = XRF$LLXR[0] + XRF$LLXRL[0]; # PLXRF TABLE #
- XRF$PLXRFL[0] = PLXREFLS;
- TO = TO + XRF$LLXRL[0];
- MOVEI(PLXREFLS, P<PLXREFS>, TO);
- WRITOVL;
- #
- * GET THE OPERATOR I/O OVERLAY. WRITE IT OUT TO THE OVERLAY FILE.
- #
- OVN$NUM[0] = OIO$NAM;
- ADDLEN = 0;
- GET$OVL;
- WRITOVL;
- #
- * GET THE COMMAND RECOGNIZER OVERLAY. WRITE IT OUT TO THE OVERLAY
- * FILE.
- #
- OVN$NUM[0] = CMR$NAM;
- ADDLEN = 0;
- GET$OVL;
- WRITOVL;
- #
- * GET THE COMMAND PREPROCESSOR OVERLAY. CALCULATE THE TOTAL LENGTH
- * NEEDED TO LOAD ITS CROSS REFERENCE TABLES, WHICH ARE: DEX, LIX,
- * LLXR, AND PLXREF. LOAD THE OVERLAY. THEN MOVE ONE TABLE
- * AT A TIME TO THE END OF THE OVERLAY. INITIALIZE THE POINTER
- * ADDRESS AND LENGTH OF THE TABLES DEFINED IN LABELLED COMMON
- * BLOCK *CSXRF*.
- * WRITE THE OVERLAY OUT TO THE OVERLAY FILE.
- #
- OVN$NUM[0] =CMP$NAM;
- ADDLEN = DEXLS + LIXLS + LLXREFLS + PLXREFLS;
- GET$OVL;
- P<XRF> = FWA + 4 + EAH$NEP[0];
- XRF$DEX[0] = LOADBASE + LENGTH; # DEX TABLE #
- XRF$DEXL[0] = DEXLS;
- TO = FWA + LENGTH;
- MOVEI(DEXLS, P<DEXS>, TO);
- XRF$LIX[0] = XRF$DEX[0] + XRF$DEXL[0]; # LIX TABLE #
- XRF$LIXL[0] = LIXLS;
- TO = TO + XRF$DEXL[0];
- MOVEI(LIXLS, P<LIXS>, TO);
- XRF$LLXR[0] = XRF$LIX[0] + XRF$LIXL[0]; # LLXR TABLE #
- XRF$LLXRL[0] = LLXREFLS;
- TO = TO + XRF$LIXL[0];
- MOVEI(LLXREFLS, P<LLXRS>, TO);
- XRF$PLXRF[0] = XRF$LLXR[0] + XRF$LLXRL[0]; # PLXRF TABLE #
- XRF$PLXRFL[0] = PLXREFLS;
- TO = TO + XRF$LLXRL[0];
- MOVEI(PLXREFLS, P<PLXREFS>, TO);
- WRITOVL;
- #
- * GET THE OPERATOR SUPERVISION OVERLAY. WRITE IT OUT TO THE
- * OVERLAY FILE.
- #
- OVN$NUM[0] = OSS$NAM;
- ADDLEN = 0;
- GET$OVL;
- WRITOVL;
- #
- * ZERO OUT THE LENGTH OF ALL CROSS REFERENCE TABLES IN
- * MANAGED AREA.
- #
- DEXLS = 0;
- LIXLS = 0;
- LLXREFLS = 0;
- PLXREFLS = 0;
- RETURN; # **** RETURN **** #
- END # CSIBOF #
- TERM
cdc/nos2.source/nam5871/csibof.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator