cdc:nos2.source:nam5871:np_rloc
Table of Contents
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
- *DECK NP$RLOC
- *IF,DEF,XFR
- USETEXT NX$ACBF
- USETEXT AIPDEF
- USETEXT HEADER
- USETEXT NX$MSG
- USETEXT NP$STAT
- USETEXT NP$DB
- USETEXT NP$NWL
- USETEXT NP$MODE
- USETEXT NP$GETS
- USETEXT NX$ACBX
- PROC NP$RLOC;
- BEGIN
- #
- **
- * 1. PROC NAME AUTHOR DATE
- *
- * NP$RLOC Y. C. YIP 07/12/1984
- *
- * 2. FUNCTIONAL DESCRIPTION.
- *
- * NP$RLOC COMPUTES ADDITIONAL MEMORY NEEDED FOR A
- * INTRAHOST BINARY FILE TRANSFER AND ALLOCATES THE
- * ADDITIONAL BUFFERS NEEDED.
- *
- * 3. METHOD USED.
- *
- * NP$RLOC CLOSES THE FILE AND RELEASES THE ALLOCATED
- * MEMORY FOR A PRU FILE TRANSFER.
- * NEXT IT COMPUTES THE TOTAL MEMORY NEEDED INCLUDING
- * THE CMB BUFFER, THE NETBUF AND THE CHECKMARK BUFFER.
- * IT CALLS NP$CMAF TO ALLOCATES BUFFER SPACE.
- * FINALLY, IT PERFORMS NETFET INITIALIZATION AND
- * ALSO SET THE FTTNOTRAN FLAG IN THE FTT.
- *
- * 4. ENTRY CONDITIONS:
- *
- * FTTINDEX MUST BE POINTING TO THE
- * VALID ENTRY IN THE FTT.
- *
- *
- * 5. EXIT CONDITIONS:
- *
- * ADDITIOAL BUFFER SIZE NEEDED FOR A INTRAHOST BINARY FILE
- * TRANSFER IS ALLOCATED.
- * NETWORK FET GET INITIALIZED.
- * LIMIT POINTER OF THE DISK FET RESET TO A BIGGER VALUE.
- * FLAG FTTNOTRAN SET TO TRUE
- #
- #
- ****
- #
- XREF
- BEGIN
- PROC NP$MSG; # GENERATE DAYFILE MESSAGE #
- PROC NP$ZWDS; # PROC TO ZERO OUT WORDS #
- FUNC NP$CDD C(10); # FUNCTION FOR CONVERTING #
- # INTEGER TO DISPLAY CODE #
- FUNC NP$CMAF U; # COMPASS ROUTINE TO ALLOCATE #
- # BUFFER SPACE #
- PROC NP$CMFF; # PROC TO DEALLOCATE SPACE #
- PROC NP$CIO; # CALL CIO MACRO #
- PROC NP$ZRBK; # CONVERTS BLANKS TO ZERO #
- END # BUFFER SPACE #
- #
- ****
- #
- ITEM BUFLENGTH; # LENGTH OF BUFFER TO BE #
- # ALLOCATED #
- ITEM BUFADR; # FIRST WORD ADDRESS OF NEWLY #
- # ALLOCATED SPACE #
- ITEM NET$WORD; # SIZE OF NETBUF #
- ITEM ITEMP; # INTEGER TEMPORARY #
- ITEM SAVEN C(7); # CHARACTER TEMPORARY #
- CONTROL EJECT;
- #
- ************************************************************************
- * *
- * CODE OF NP$RLOC BEGINS HERE *
- * *
- ************************************************************************
- #
- NP$CIO(CIO$CLOSE); # CLOSE THE FILE #
- P<FET$CIO> = FTTFETADR[FTTINDEX];# SET DISK FET TEMPLATE #
- SAVEN = FETLFNC[0]; # SAVE FILE NAME #
- NP$CMFF(P<FET$CIO>); # RELEASE OLD SPACE ALLOCATED #
- NET$WORD = (FTTBSIZE[FTTINDEX]*2)/15; # ESTIMATE NETBUF SIZE #
- BUFLENGTH = LEN$FET + LEN$CIOB + LEN$CMB +
- LEN$FETW + NET$WORD + LEN$CHK;
- BUFADR = NP$CMAF(BUFLENGTH,0,GROUPNAME); # ALLOCATE SPACE #
- NP$ZWDS(BUFADR,BUFLENGTH); # ZERO OUT ALLOCATED SPACE #
- FTTFETADR[FTTINDEX] = BUFADR; # SAVE NEW FET ADDRESS #
- P<FET$CIO> =FTTFETADR[FTTINDEX]; # SET TEMPLATE TO FET ADDRESS #
- FETLFNC[0] = SAVEN; # SET FILENAME #
- FETCOMP = TRUE; # SET COMPLETION BIT #
- NP$ZRBK(LOC(FETWD[0]),1); # CONVERTS BLANK TO ZERO #
- FETFETL[0] = LEN$FET - 5; # BUILD DISK FET #
- FETFIR = P<FET$CIO> + LEN$FET; # FIRST POINTER #
- FETIN[0] = FETFIR[0];
- FETOUT[0] = FETFIR[0];
- FETLIM[0] = FETFIR[0] + LEN$CIOB; # LIMIT POINTER #
- FTTCMV$BLK[FTTINDEX] = BUFADR + LEN$FET + LEN$CIOB;
- # CMB BUFFER ADDRESS #
- FTTFETW[FTTINDEX] = FTTCMV$BLK[FTTINDEX] + LEN$CMB;
- # NETWORK FET ADDRESS #
- FTTCKTBL[FTTINDEX] = FTTFETW[FTTINDEX] + LEN$FETW + NET$WORD;
- # CHECKMARK STATUS BUFFER #
- P<FET$WORK> = FTTFETW[FTTINDEX]; # ADDRESS FOR NETFET #
- FETNAME[0] = FETLFNC[0]; # SET FILE NAME #
- FETWFIRST[0] = P<FET$WORK> + LEN$FETW; # SET FIRST WORD ADR OF #
- # BUFFER #
- FETWIN[0] = FETWFIRST[0]; # SET IN AND OUT PTR FOR #
- FETWOUT[0] = FETWFIRST[0]; # NETBUF #
- FETWLIMIT[0] = FETWFIRST[0]+ NET$WORD; # SET LIMIT PTR #
- P<CMB> = FTTCMV$BLK[FTTINDEX];
- CMB$NBUF[0] = 0; # SET NETBUF FULL/EMPTY FLAG #
- CMB$DBUF[0] = 0; # SET DISKBUF FULL/EMPTY FLAG #
- CMB$STEP[0] = 6; # TREAT IT AS C6 #
- IF FTTOPCODE[FTTINDEX] EQ SEND # IF SENDER #
- THEN
- BEGIN
- CMB$DBIT[0] = CMB$STEP[0]; # SET DBIT TO STEP #
- NP$CIO(CIO$OPENR); # OPEN FOR READ ACCESS #
- END
- ELSE
- BEGIN # RECEIVER #
- CMB$DBIT[0] = WORDLENGTH - CMB$STEP[0];
- NP$CIO(CIO$OPENW); # OPEN FOR WRITE ACCESS #
- END
- FTTMFACIL[FTTINDEX] = FALSE;
- FTTRFACIL[FTTINDEX] = FALSE;
- FTTNRETRY[FTTINDEX] = 0;
- FTTNOTRAN[FTTINDEX] = TRUE; # SET NO TRANSLATION FLAG #
- IDFM$LFN[INTR$BIN] = FETNAME[0]; # GET FILE NAME CONCERNED #
- NP$MSG(IDFM$MSG[INTR$BIN],XFRDTYPE);#GENERATE DAYFILE #
- RETURN; # RETURN TO CALLER #
- END # END OF PROC NP$RLOC #
- TERM
- *ENDIF
cdc/nos2.source/nam5871/np_rloc.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator