User Tools

Site Tools


cdc:nos2.source:nam5871:np_rloc

NP$RLOC

Table Of Contents

  • [00013] PROC NP$RLOC
  • [00056] PROC NP$MSG
  • [00057] PROC NP$ZWDS
  • [00058] FUNC NP$CDD C(10)
  • [00060] FUNC NP$CMAF U
  • [00062] PROC NP$CMFF
  • [00063] PROC NP$CIO
  • [00064] PROC NP$ZRBK

Source Code

NP$RLOC.txt
  1. *DECK NP$RLOC
  2. *IF,DEF,XFR
  3. USETEXT NX$ACBF
  4. USETEXT AIPDEF
  5. USETEXT HEADER
  6. USETEXT NX$MSG
  7. USETEXT NP$STAT
  8. USETEXT NP$DB
  9. USETEXT NP$NWL
  10. USETEXT NP$MODE
  11. USETEXT NP$GETS
  12. USETEXT NX$ACBX
  13. PROC NP$RLOC;
  14. BEGIN
  15. #
  16. **
  17. * 1. PROC NAME AUTHOR DATE
  18. *
  19. * NP$RLOC Y. C. YIP 07/12/1984
  20. *
  21. * 2. FUNCTIONAL DESCRIPTION.
  22. *
  23. * NP$RLOC COMPUTES ADDITIONAL MEMORY NEEDED FOR A
  24. * INTRAHOST BINARY FILE TRANSFER AND ALLOCATES THE
  25. * ADDITIONAL BUFFERS NEEDED.
  26. *
  27. * 3. METHOD USED.
  28. *
  29. * NP$RLOC CLOSES THE FILE AND RELEASES THE ALLOCATED
  30. * MEMORY FOR A PRU FILE TRANSFER.
  31. * NEXT IT COMPUTES THE TOTAL MEMORY NEEDED INCLUDING
  32. * THE CMB BUFFER, THE NETBUF AND THE CHECKMARK BUFFER.
  33. * IT CALLS NP$CMAF TO ALLOCATES BUFFER SPACE.
  34. * FINALLY, IT PERFORMS NETFET INITIALIZATION AND
  35. * ALSO SET THE FTTNOTRAN FLAG IN THE FTT.
  36. *
  37. * 4. ENTRY CONDITIONS:
  38. *
  39. * FTTINDEX MUST BE POINTING TO THE
  40. * VALID ENTRY IN THE FTT.
  41. *
  42. *
  43. * 5. EXIT CONDITIONS:
  44. *
  45. * ADDITIOAL BUFFER SIZE NEEDED FOR A INTRAHOST BINARY FILE
  46. * TRANSFER IS ALLOCATED.
  47. * NETWORK FET GET INITIALIZED.
  48. * LIMIT POINTER OF THE DISK FET RESET TO A BIGGER VALUE.
  49. * FLAG FTTNOTRAN SET TO TRUE
  50. #
  51. #
  52. ****
  53. #
  54. XREF
  55. BEGIN
  56. PROC NP$MSG; # GENERATE DAYFILE MESSAGE #
  57. PROC NP$ZWDS; # PROC TO ZERO OUT WORDS #
  58. FUNC NP$CDD C(10); # FUNCTION FOR CONVERTING #
  59. # INTEGER TO DISPLAY CODE #
  60. FUNC NP$CMAF U; # COMPASS ROUTINE TO ALLOCATE #
  61. # BUFFER SPACE #
  62. PROC NP$CMFF; # PROC TO DEALLOCATE SPACE #
  63. PROC NP$CIO; # CALL CIO MACRO #
  64. PROC NP$ZRBK; # CONVERTS BLANKS TO ZERO #
  65. END # BUFFER SPACE #
  66. #
  67. ****
  68. #
  69. ITEM BUFLENGTH; # LENGTH OF BUFFER TO BE #
  70. # ALLOCATED #
  71. ITEM BUFADR; # FIRST WORD ADDRESS OF NEWLY #
  72. # ALLOCATED SPACE #
  73. ITEM NET$WORD; # SIZE OF NETBUF #
  74. ITEM ITEMP; # INTEGER TEMPORARY #
  75. ITEM SAVEN C(7); # CHARACTER TEMPORARY #
  76. CONTROL EJECT;
  77. #
  78. ************************************************************************
  79. * *
  80. * CODE OF NP$RLOC BEGINS HERE *
  81. * *
  82. ************************************************************************
  83. #
  84. NP$CIO(CIO$CLOSE); # CLOSE THE FILE #
  85. P<FET$CIO> = FTTFETADR[FTTINDEX];# SET DISK FET TEMPLATE #
  86. SAVEN = FETLFNC[0]; # SAVE FILE NAME #
  87. NP$CMFF(P<FET$CIO>); # RELEASE OLD SPACE ALLOCATED #
  88. NET$WORD = (FTTBSIZE[FTTINDEX]*2)/15; # ESTIMATE NETBUF SIZE #
  89. BUFLENGTH = LEN$FET + LEN$CIOB + LEN$CMB +
  90. LEN$FETW + NET$WORD + LEN$CHK;
  91. BUFADR = NP$CMAF(BUFLENGTH,0,GROUPNAME); # ALLOCATE SPACE #
  92. NP$ZWDS(BUFADR,BUFLENGTH); # ZERO OUT ALLOCATED SPACE #
  93. FTTFETADR[FTTINDEX] = BUFADR; # SAVE NEW FET ADDRESS #
  94. P<FET$CIO> =FTTFETADR[FTTINDEX]; # SET TEMPLATE TO FET ADDRESS #
  95. FETLFNC[0] = SAVEN; # SET FILENAME #
  96. FETCOMP = TRUE; # SET COMPLETION BIT #
  97. NP$ZRBK(LOC(FETWD[0]),1); # CONVERTS BLANK TO ZERO #
  98. FETFETL[0] = LEN$FET - 5; # BUILD DISK FET #
  99. FETFIR = P<FET$CIO> + LEN$FET; # FIRST POINTER #
  100. FETIN[0] = FETFIR[0];
  101. FETOUT[0] = FETFIR[0];
  102. FETLIM[0] = FETFIR[0] + LEN$CIOB; # LIMIT POINTER #
  103. FTTCMV$BLK[FTTINDEX] = BUFADR + LEN$FET + LEN$CIOB;
  104. # CMB BUFFER ADDRESS #
  105. FTTFETW[FTTINDEX] = FTTCMV$BLK[FTTINDEX] + LEN$CMB;
  106. # NETWORK FET ADDRESS #
  107. FTTCKTBL[FTTINDEX] = FTTFETW[FTTINDEX] + LEN$FETW + NET$WORD;
  108. # CHECKMARK STATUS BUFFER #
  109. P<FET$WORK> = FTTFETW[FTTINDEX]; # ADDRESS FOR NETFET #
  110. FETNAME[0] = FETLFNC[0]; # SET FILE NAME #
  111. FETWFIRST[0] = P<FET$WORK> + LEN$FETW; # SET FIRST WORD ADR OF #
  112. # BUFFER #
  113. FETWIN[0] = FETWFIRST[0]; # SET IN AND OUT PTR FOR #
  114. FETWOUT[0] = FETWFIRST[0]; # NETBUF #
  115. FETWLIMIT[0] = FETWFIRST[0]+ NET$WORD; # SET LIMIT PTR #
  116. P<CMB> = FTTCMV$BLK[FTTINDEX];
  117. CMB$NBUF[0] = 0; # SET NETBUF FULL/EMPTY FLAG #
  118. CMB$DBUF[0] = 0; # SET DISKBUF FULL/EMPTY FLAG #
  119. CMB$STEP[0] = 6; # TREAT IT AS C6 #
  120. IF FTTOPCODE[FTTINDEX] EQ SEND # IF SENDER #
  121. THEN
  122. BEGIN
  123. CMB$DBIT[0] = CMB$STEP[0]; # SET DBIT TO STEP #
  124. NP$CIO(CIO$OPENR); # OPEN FOR READ ACCESS #
  125. END
  126. ELSE
  127. BEGIN # RECEIVER #
  128. CMB$DBIT[0] = WORDLENGTH - CMB$STEP[0];
  129. NP$CIO(CIO$OPENW); # OPEN FOR WRITE ACCESS #
  130. END
  131. FTTMFACIL[FTTINDEX] = FALSE;
  132. FTTRFACIL[FTTINDEX] = FALSE;
  133. FTTNRETRY[FTTINDEX] = 0;
  134. FTTNOTRAN[FTTINDEX] = TRUE; # SET NO TRANSLATION FLAG #
  135. IDFM$LFN[INTR$BIN] = FETNAME[0]; # GET FILE NAME CONCERNED #
  136. NP$MSG(IDFM$MSG[INTR$BIN],XFRDTYPE);#GENERATE DAYFILE #
  137. RETURN; # RETURN TO CALLER #
  138. END # END OF PROC NP$RLOC #
  139. TERM
  140. *ENDIF
  141.  
cdc/nos2.source/nam5871/np_rloc.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator