cdc:nos2.source:nam5871:nvfiivf
Table of Contents
NVFIIVF
Table Of Contents
- [00003] PROC NVFIIVF
- [00004] NVFIIVF - INITIALIZE THE VCB FILE
- [00008] INITIALIZE THE VCB FILE.
- [00039] PROC RECALL
- [00040] PROC REWIND
- [00041] PROC WRITECW
- [00042] PROC WRITEF
- [00043] PROC WRITEWC
- [00059] PRUBUF - ONE VCB RECORD + 2 CONTROL WORDS
Source Code
- NVFIIVF.txt
- *DECK NVFIIVF
- USETEXT TXVCBNV
- PROC NVFIIVF;
- # TITLE NVFIIVF - INITIALIZE THE VCB FILE #
- BEGIN # NVFIIVF #
- #
- ** NVFIIVF - INITIALIZE THE VCB FILE.
- *
- * A. LIM 81/09/14
- *
- * THIS ROUTINE IS PART OF THE INITIALIZATION PROCESS FOR NVF.
- * ITS JOB IS TO PRESET THE VCB FILE WITH ZEROES, AND PRE-ASSIGN
- * EACH ENTRY WITH A VCB ORDINAL.
- *
- * PROC NVFIIVF
- *
- * ENTRY NONE
- *
- * EXIT VCB FILE INITIALIZED.
- *
- * NOTES NONE
- *
- * METHOD MARCEL ROUTINE WRITECW IS CALLED TO WRITE PRU
- * IMAGES CONTINUOUSLY ON THE VCB FILE.
- *
- #
- #
- **** PROC NVFIIVF - XREF LIST BEGIN
- #
- XREF
- BEGIN
- PROC RECALL;
- PROC REWIND;
- PROC WRITECW;
- PROC WRITEF;
- PROC WRITEWC;
- END
- #
- ****
- #
- # ITEMS #
- ITEM I,J,K,L; # INDUCTION VARIABLES #
- ITEM ENTRYNO U; # ENTRY NUMBER #
- ITEM VCBORD U; # VCB ORDINAL #
- #
- ** PRUBUF - ONE VCB RECORD + 2 CONTROL WORDS
- *
- * PRUBUF CONTAINS THE IMAGE OF ONE VCB RECORD + 2 CONTROL WORDS
- * WITHIN A PRU.
- #
- ARRAY PRUBUF[00:VBRECDCW1$] S(1);
- BEGIN
- ITEM PR$WORD U(00,00,60); # FULL WORD REFERENCE #
- ITEM PR$PRUSIZ U(00,06,18); # PRU SIZE #
- ITEM PR$BL U(00,36,24); # BLOCK LENGTH #
- ITEM PR$LN U(00,00,12); # LEVEL NUMBER #
- ITEM PR$VCBORD U(00,48,12); # VCB ORDINAL #
- END
- #
- * CWBUF - 2 CONTROL WORDS
- #
- ARRAY CWBUF[00:00] S(2);
- BEGIN
- ITEM CW$WORD U(00,00,60); # FULL WORD REFERENCE #
- ITEM CW$PRUSIZ U(00,06,18) = [O"100"]; # PRU SIZE #
- ITEM CW$LN U(01,00,12) = [O"17"]; #LEVEL NUMBER #
- END
- CONTROL EJECT;
- #
- * INITIALIZES VCB FET
- #
- VB$LFN[0] = "VCBFILE";
- VB$CODE[0] = 3;
- VB$R[0] = TRUE;
- VB$L[0] = VBFETSIZ$ - 5;
- #
- * SET VCB FET TO THE LOCATION OF VCB BUFFER.
- #
- VB$FIRST[0] = LOC(VCBBUFR);
- VB$IN[0] = LOC(VCBBUFR);
- VB$OUT[0] = LOC(VCBBUFR);
- VB$LIMIT[0] = VB$FIRST[0] + VBBUFLIM$ + 1;
- # PRESET THE WHOLE BUFFER WITH ZEROES #
- FOR I = 0 STEP 1 UNTIL VBRECDCW1$
- DO
- BEGIN
- PR$WORD[I] = 0;
- END
- # SET CONTROL WORDS #
- PR$PRUSIZ[0] = PRUSIZ$; # SET PRU SIZE #
- PR$BL[0] = VBBL$; # SET BLOCK LENGTH #
- PR$LN[VBRECDCW1$] = VBLNEOR$; # SET EOR AS THE LEVEL NUMBER #
- # SET VCB ORDINALS FOR ALL ENTRIES WITHIN THE FIRST PRU #
- ENTRYNO = 1;
- FOR J = 1 STEP 1 UNTIL VBMXENTRY$
- DO
- BEGIN
- PR$VCBORD[ENTRYNO] = J; # SEQUENTIALLY ASSIGN VCB ORD #
- ENTRYNO = ENTRYNO + VBESIZ$;
- END
- #
- * WRITE THE FIRST RECORD TO THE CIO BUFFER
- #
- REWIND(VCBFET); # REWIND VCB FILE #
- WRITEWC(VCBFET,PRUBUF,VBRECDCW$); # TRANSFR THE RECORD TO CIR BUF#
- WRITECW(VCBFET); # WRITE FUNCTION CODE ON VCB FET#
- #
- * WRITE THE REST (MAXSEC$ - 1) OF RECORDS TO VCB FILE
- #
- FOR K = 1 STEP 1 UNTIL MAXSEC$ - 1
- DO
- BEGIN
- VCBORD = K * 2 ** 3 + 1; # SET VCB ORDINAL FOR THIS(KTH) PRU#
- ENTRYNO = 1;
- FOR L = 1 STEP 1 UNTIL VBMXENTRY$
- DO
- BEGIN # ASSIGN VCB ORDINAL #
- PR$VCBORD[ENTRYNO] = VCBORD;
- VCBORD = VCBORD + 1;
- ENTRYNO = ENTRYNO + VBESIZ$;
- END
- WRITEWC(VCBFET,PRUBUF,VBRECDCW$); # TRANSFER THE RECORD #
- END
- WRITEWC(VCBFET,CWBUF,2); # WRITE 2 CONTROL WORDS #
- WRITECW(VCBFET);
- RECALL(VCBFET);
- END # NVFIIVF #
- TERM
cdc/nos2.source/nam5871/nvfiivf.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator