User Tools

Site Tools


cdc:nos2.source:nam5871:nvfuafv

NVFUAFV

Table Of Contents

  • [00003] PROC NVFUAFV(VCBORD,ERROR)
  • [00004] NVFUAFV - ASSIGNS A FREE VCB ORDINAL.
  • [00008] ASSIGNS A FREE VCB ORDINAL.
  • [00037] PROC SSBFPB
  • [00038] PROC SSBCBW

Source Code

NVFUAFV.txt
  1. *DECK NVFUAFV
  2. USETEXT TXVCBNV
  3. PROC NVFUAFV(VCBORD,ERROR);
  4. # TITLE NVFUAFV - ASSIGNS A FREE VCB ORDINAL. #
  5.  
  6. BEGIN # NVFUAFV #
  7. #
  8. ** NVFUAFV - ASSIGNS A FREE VCB ORDINAL.
  9. *
  10. * A. LIM 81/07/21
  11. *
  12. * THIS PROCEDURE ASSIGNS A FREE VCB IF ONE IS AVAILABLE.
  13. *
  14. * PROC NVFUAFV(VCBORD,ERROR)
  15. *
  16. * ENTRY NONE
  17. *
  18. * EXIT VCBORD = VCB ORDINAL ASSIGNED
  19. * ERROR = FALSE/TRUE, ASSIGNED/NOT-AVAILABLE
  20. *
  21. * NOTES NONE
  22. *
  23. * METHOD SEARCH VCB-ORDINAL-TABLE(VOT) FOR A FREE VCB ORDINAL.
  24. * IF FOUND, MARK IT BUSY, INCREMENT ACTIVE-VCB-COUNT
  25. * (AVCBCNT), AND RETURN THE VALUE OF THE ORDINAL, ELSE
  26. * EXIT WITH ERROR = TRUE.
  27. *
  28. #
  29.  
  30.  
  31.  
  32. #
  33. **** PROC NVFUAFV XREF BEGIN.
  34. #
  35. XREF
  36. BEGIN
  37. PROC SSBFPB; # SS - FIND PRORITY BIT #
  38. PROC SSBCBW; # SS - CLEAR BIT IN WORD #
  39. END
  40. #
  41. ****
  42. #
  43.  
  44. # FORMAL PARAMETERS #
  45.  
  46. ITEM VCBORD I; # VCB ORDINAL #
  47. ITEM ERROR B; # ERROR CODE #
  48.  
  49.  
  50. # ACTUAL PARAMETERS #
  51.  
  52. ITEM WORD I; # WORD BIT IN #
  53. ITEM BITN I; # BIT NUMBER WITHIN WORD #
  54.  
  55.  
  56.  
  57.  
  58.  
  59. FOR WORD = 0 STEP 1 UNTIL VTSIZE$ #SEARCH VOT FOR A FREE VCB #
  60. DO
  61. BEGIN
  62. IF VOT$WORD[WORD] NQ 0 THEN
  63. BEGIN # FOUND #
  64. SSBFPB(VOT[WORD],BITN); # LOCATE THE FREE VCB #
  65. VCBORD = 48 * WORD +BITN; # RETURN THE VCB ORDINAL #
  66. ERROR = FALSE; # WITH NO ERROR #
  67. SSBCBW(VOT[WORD],BITN); # MARK THE ORDINAL BUSY #
  68. AVCBCNT = AVCBCNT + 1; # INCR COUNT OF ACTIVE VCB #
  69. GOTO EXIT;
  70. END
  71. END
  72.  
  73. ERROR = TRUE;
  74. EXIT:
  75. RETURN;
  76.  
  77. END # NVFUAFV #
  78. TERM
cdc/nos2.source/nam5871/nvfuafv.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator