User Tools

Site Tools


cdc:nos2.source:nam5871:nvfiivt

NVFIIVT

Table Of Contents

  • [00003] PROC NVFIIVT
  • [00004] NVFIIVT - INITIALIZES THE VOT AND VDT TABLES
  • [00008] INITIALIZES THE VOT AND VDT TABLES

Source Code

NVFIIVT.txt
  1. *DECK NVFIIVT
  2. USETEXT TXVCBNV
  3. PROC NVFIIVT;
  4. # TITLE NVFIIVT - INITIALIZES THE VOT AND VDT TABLES #
  5.  
  6. BEGIN # NVFIIVT #
  7. #
  8. ** NVFIIVT - INITIALIZES THE VOT AND VDT TABLES
  9. *
  10. * A. LIM 81/08/07
  11. *
  12. * THIS PROCEDURE INITIALIZES THE VCB-ORDINAL-TABLE(VOT) AND
  13. * THE VCB-DATA-VALID-INDICATOR-TABLE(VDT).
  14. *
  15. * PROC NVFIIVT
  16. *
  17. * ENTRY NONE
  18. *
  19. * EXIT VOT IS INITIALIZED TO FREE STATE, WHILE
  20. * VDT IS INITIALIZED TO INVALID STATE.
  21. *
  22. * NOTES NONE
  23. *
  24. * METHOD PHYSICAL FEATURES OF THE FILES SUCH AS THE
  25. * MAXIMUM-SECTOR-PER-TRACK(MST), MAXIMUM-
  26. * ENTRIES-PER-SECTOR(MES), ACTUAL-ENTRIES-
  27. * PER-SECTOR(AES), BITS-USED-IN-WORD, AND
  28. * WORDS-PER-TABLE, ARE DEFINED IN TXVCBNV.
  29. * FIRST, A BIT PATTERN OF MES BITS WITH AES
  30. * BITS SET IS BUILT. FOR EXAMPLE, MES = 8,
  31. * AND AES = 7, THEN THE BIT PATTERN WOULD
  32. * LOOK LIKE THIS: 11111110.
  33. * FINALLY THE VOT AND THE VDT TABLES WOULD BE
  34. * SET TO THE BIT PATTERN A BYTE AT A TIME
  35. * UNTIL MST TIMES IS EXHAUSTED.
  36. *
  37. #
  38.  
  39.  
  40. # ITEMS #
  41.  
  42. ITEM BITPTN U; # BIT PATTERN #
  43. ITEM I,J,K,L I; # INDUCTION VARIABLES #
  44. ITEM SECWORD U; # SECTORS/WORD #
  45. ITEM WRDS U; # VOT AND VDT TABLE SIZE #
  46. ITEM WD U; # THE NTH WORD IN THE TABLE #
  47.  
  48.  
  49. CONTROL EJECT;
  50.  
  51. SECWORD = BITSWORD$/MAXENSEC$; # CAL SECTORS/WORD #
  52. WRDS = (MAXSEC$ + SECWORD - 1)/SECWORD; # CAL TBL SIZ(VTSIZE$) #
  53.  
  54. # SET BIT PATTERN #
  55.  
  56. FOR I = 0 STEP 1 UNTIL MAXENSEC$ - 1 DO
  57. BEGIN
  58. IF I LQ ACTENSEC$ - 1 THEN
  59. BEGIN
  60. B<I,1>BITPTN = 1;
  61. END
  62. ELSE
  63. BEGIN
  64. B<I,1>BITPTN = 0;
  65. END
  66. END # FOR LOOP #
  67.  
  68. #
  69. * INITIALIZES VOT AND VDT A BYTE AT A TIME WITH THE
  70. * AFORE-DEFINED BIT PATTERN
  71. #
  72.  
  73. FOR J = 1 STEP SECWORD UNTIL MAXSEC$ DO
  74. BEGIN
  75. WD = J/SECWORD;
  76. K = MAXSEC$ - WD * SECWORD;
  77. IF K GR SECWORD THEN
  78. BEGIN
  79. K = SECWORD;
  80. END
  81. FOR L = 0 STEP 1 UNTIL K - 1 DO
  82. BEGIN
  83. B<12+L*MAXENSEC$, MAXENSEC$>VOT$WORD[WD] =
  84. B<0, MAXENSEC$>BITPTN;
  85. B<12+L*MAXENSEC$, MAXENSEC$>VDT$WORD[WD] =
  86. B<0, MAXENSEC$>BITPTN;
  87. END # FOR L LOOP #
  88. END # FOR J LOOP #
  89. RETURN;
  90. END # NVFIIVT #
  91. TERM
cdc/nos2.source/nam5871/nvfiivt.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator