User Tools

Site Tools


cdc:nos2.source:nam5871:np_bfet

NP$BFET

Table Of Contents

  • [00006] PROC NP$BFET(FILENAME,CIO$SIZE,NET$SIZE)
  • [00007] NP$BFET - BUILD FET. USE FOR FILE TRANSFER APPLICATION ONLY
  • [00040] PROC NP$ZRBK

Source Code

NP$BFET.txt
  1. *DECK NP$BFET
  2. *IF DEF,XFR
  3. USETEXT AIPDEF
  4. USETEXT NX$CHAR
  5. USETEXT NX$ACBX
  6. PROC NP$BFET(FILENAME,CIO$SIZE,NET$SIZE) ;
  7. # TITLE NP$BFET - BUILD FET. USE FOR FILE TRANSFER APPLICATION ONLY#
  8.  
  9. BEGIN # NP$BFET #
  10.  
  11. #
  12. ***
  13. * PROC NAME: AUTHOR DATE
  14. * NP$BFET L.T.NGUYEN 83/03/20
  15. *
  16. * NP$BFET CREATES THE LOCAL FILE FET AND THE
  17. * RHF NETXFR REQUEST/REPLY PARAMETER BLOCK ASSOCIATED WITH THIS ACN.
  18. *
  19. * PROC NP$BFET(FILENAME)
  20. *
  21. * ENTRY FILENAME - FILE NAME OF LOCAL FILE.
  22. * CIO$SIZE - SIZE OF CIRCULAR BUFFER.
  23. * NET$SIZE - SIZE OF NETWORKING BUFFER.
  24. * FTTINDEX - INDEX INTO FTT TABLE ( GLOBAL )
  25. *
  26. * EXIT LOCAL FILE FET SET UP.
  27. *
  28. * PROCESS BUILD LOCAL FILE FET.
  29. * SET FIRST AND LIMIT POINTERS IN FET.
  30. *
  31. #
  32.  
  33. ITEM FILENAME C(7); # FILE NAME #
  34. ITEM CIO$SIZE U ; # CIO BUFFER AREA #
  35. ITEM NET$SIZE U ;
  36.  
  37.  
  38. XREF
  39. BEGIN
  40. PROC NP$ZRBK ; # REPLACE TRAILING " " WITH ZEROS #
  41. END
  42.  
  43. P<FET$CIO> = FTTFETADR[FTTINDEX] ;
  44.  
  45. #
  46. * BUILD THE LOCAL FILE FET
  47. #
  48.  
  49. #
  50.   CIRCULAR I/O BUFFER.
  51. #
  52. FETLFNC[0] = FILENAME;
  53. FETCOMP = TRUE;
  54. NP$ZRBK(LOC(FETWD[0]),1) ;
  55. FETFETL[0] = LEN$FET - 5;
  56. FETFIR = P<FET$CIO> + LEN$FET ;
  57. FETIN[0] = FETFIR[0];
  58. FETOUT[0] = FETFIR[0];
  59. FETLIM[0] = FETFIR[0] + CIO$SIZE ;
  60.  
  61. P<FET$WORK> = FTTFETW[FTTINDEX] ;
  62. FTTICKVAL[FTTINDEX] = 0; # INITIAL CHECKMARK VALUE TO ZERO #
  63. IF P<FET$WORK> NQ 0
  64. THEN
  65. BEGIN # NON - PRU CONNECTION #
  66. FETNAME[0] = FILENAME ;
  67. FETWFIRST[0] = P<FET$WORK> + LEN$FETW ;
  68. FETWIN[0] = FETWFIRST[0] ;
  69. FETWOUT[0] = FETWFIRST[0] ;
  70. FETWLIMIT[0] = FETWFIRST[0] + NET$SIZE ;
  71. P<CMB> = FTTCMV$BLK[FTTINDEX]; # CONVERSION PARAMETER BLOCK #
  72. CMB$DBUF[0] = 0;
  73. CMB$NBUF[0] = 0;
  74. CMB$NCOUNT[0] = TBH$LEN; # LENGTH OF TBH IN OCTETS #
  75. CMB$BLKSZ[0] = FTTBSIZE[FTTINDEX]; # BLOCK SIZE #
  76. CMB$NBYTE[0] = INITNBYTE; # INITIAL VALUE OF NBYTE #
  77. IF FTTUDD[FTTINDEX] EQ C6 # IF C6 #
  78. THEN
  79. BEGIN
  80. CMB$STEP[0] = 6;
  81. END
  82. ELSE
  83. BEGIN
  84. CMB$STEP[0] = 12;
  85. END
  86. IF FTTOPCODE[FTTINDEX] EQ SEND # IF SENDER #
  87. THEN
  88. BEGIN
  89. CMB$DBIT[0] = CMB$STEP[0];
  90. CMB$TBLADR[0] = LOC(CSET1) ; # ADDRESS OF CONVERSION TABLE #
  91. END
  92. ELSE # ELSE IF RECEIVER #
  93. BEGIN
  94. CMB$DBIT[0] = WORDLENGTH - CMB$STEP[0];
  95. CMB$TBLADR[0] = LOC(CSET2) ; # ADDRESS OF CONVERSION TABLE #
  96. END
  97. P<CHK> = FTTCKTBL[FTTINDEX]; # PRESET CHECK MARK TABLE #
  98. CHK$IDX[0] = 1; # AT LEAST ONE ENTRY #
  99. CHK$DBIT[1] = CMB$DBIT[0]; # SET DBIT #
  100. FTTCURPRU[FTTINDEX] = 0; # PRU 0 #
  101. FTTDBIT[FTTINDEX] = CMB$DBIT; # DBIT #
  102. END
  103.  
  104. RETURN ;
  105. END # BUILDFT #
  106.  
  107. TERM
  108. *ENDIF
cdc/nos2.source/nam5871/np_bfet.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator