cdc:nos2.source:nam5871:msetptr
Table of Contents
MSETPTR
Table Of Contents
- [00005] PRGM MSETPTR
- [00056] PROC MSETIL
- [00057] PROC XTRACE
Source Code
- MSETPTR.txt
- *DECK MSETPTR
- USETEXT NIPDEF
- USETEXT PIT
- USETEXT PRUBUFF
- PRGM MSETPTR; # SET BACKWARD PTRS IN PRU CHAIN#
- STARTIMS;
- #
- *1DC MSETPTR
- *
- * 1. PROC NAME AUTHOR DATE
- * MSETPTR E. GEE 85/04/02
- *
- * 2. FUNCTIONAL DESCRIPTION
- * SET UP BACKWARD POINTERS IN THE PRU BUFFERS FOR GARBAGE
- * COLLECTION.
- *
- * 3. METHOD USED
- * CALL MSETIL TO SET NIP/PIP INTERLOCK.
- * LOOP TO PROCESS EACH PIT ENTRY.
- * IF PIT ENTRY IN USE,
- * LOOP TO PROCESS EACH PRU BUFFER SIZE,
- * IF PRU BUFFERS EXISTS,
- * SET UP BACKWARD POINTERS IN THE PRU BUFFER.
- *
- * 4. ENTRY PARAMETERS
- * NONE
- *
- * 5. EXIT PARAMETERS
- * NONE
- *
- * 6. COMDECKS CALLED
- * NIPDEF NIP CONSTANT DEFINITIONS
- * PIT PIP INTERFACE TABLE
- * PRUBUFF PRU BUFFER TEMPLATE
- *
- * 7. ROUTINES AND OVERLAYS CALLED
- * MSETIL SET NIP/PIP INTERLOCK
- * XTRACE TRACE CALLS
- *
- * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
- *
- * THIS PROGRAM IS A PRIMARY OVERLAY LOADED BY SUBROUTINE OVLCALL.
- * WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO LOCATION RJMAIN
- * TO RETURN TO THE CALLING PROGRAM.
- *
- * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
- * OVERLAY BUFFER SIZE MINUS 5 (560B WORDS).
- *
- * THIS OVERLAY IS CALLED BY XEXEC.
- *
- #
- STOPIMS;
- XREF
- BEGIN
- PROC MSETIL; # SET NIP/PIP INTERLOCK #
- PROC XTRACE; # RECORD TRACES #
- LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
- END
- #
- INTERNAL VARIABLES
- #
- ITEM I; # INDUCTION VARIABLE #
- ITEM J; # INDUCTION VARIABLE #
- ITEM BACKPRU; # ADDR OF PREV PRU BUF IN CHAIN #
- ITEM PITIDX; # PIT ENTRY INDEX #
- BASED ARRAY PRUNIPWD S(1); # TEMPLATE FOR NIP WORD IN PIT #
- BEGIN
- ITEM PRUNIPMFB U(0,00,06); # MINIMUM NO OF PRU BUFS #
- ITEM PRUNIPMAB U(0,06,06); # MAXIMUM NO OF PRU BUFS #
- ITEM PRUNIPNCA U(0,12,12); # CURRENT NO OF BUFFERS ASSIGNED#
- ITEM PRUNIPNC U(0,24,12); # CURRENT NO OF PRU CONNECTIONS #
- ITEM PRUNIPFPB U(0,42,18); # ADR OF FIRST BUF IN FREE CHAIN#
- END
- #**********************************************************************#
- CONTROL EJECT;
- BEGIN # BEGIN MSETPTR #
- CONTROL IFEQ DEBUG,1;
- XTRACE("MSETP");
- CONTROL FI;
- MSETIL(0); # SET NIP/PIP INTERLOCK #
- FOR I = 1 STEP 1 UNTIL MAXPIP
- DO # PROCESS EACH PIT ENTRY #
- BEGIN
- IF PITPUF[I]
- THEN # PIT ENTRY IS IN USE #
- BEGIN
- P<PRUNIPWD> = LOC(PITFPB1[I]); # ADDR OF PRU BUF POINTER WORD#
- FOR J = 0 STEP 1 UNTIL MAXPRU-1
- DO # PROCESS EACH PRU BUFFER SIZE #
- BEGIN
- BACKPRU = LOC(PRUNIPFPB[J]); # ADDR OF PTR WORD IN PIT ENT#
- P<PRUBUFF> = PRUNIPFPB[J]; # ADDR OF 1ST PRU BUF IN CHAIN #
- FOR J=J WHILE P<PRUBUFF> NQ 0
- DO # PROCESS EACH PRU BUF IN CHAIN #
- BEGIN
- PRUBBACK[0] = BACKPRU; # SET UP BACKWARD CHAIN PTR #
- BACKPRU = P<PRUBUFF>; # ADDR OF THIS PRU BUFFER #
- P<PRUBUFF> = PRUBDLFP[0]; # ADDR OF 1ST PRU BUF IN CHAIN#
- END
- END
- END
- END
- GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
- END
- TERM
cdc/nos2.source/nam5871/msetptr.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator