User Tools

Site Tools


cdc:nos2.source:nam5871:mdrptr

MDRPTR

Table Of Contents

  • [00005] PROC MDRPTR(RINGFP,RINGBP,PTR)
  • [00058] PROC MCHKPTR
  • [00059] PROC XTRACE

Source Code

MDRPTR.txt
  1. *DECK MDRPTR
  2. USETEXT NIPDEF
  3. USETEXT DRHDR
  4. USETEXT FREETAB
  5. PROC MDRPTR(RINGFP,RINGBP,PTR);
  6. STARTIMS;
  7. #
  8. *1DC MDRPTR
  9. *
  10. * 1. PROC NAME AUTHOR DATE
  11. * MDRPTR C. BITTNER 82/07/01
  12. *
  13. * 2. FUNCTIONAL DESCRIPTION
  14. * UPDATE DATA RING POINTERS
  15. *
  16. * 3. METHOD USED
  17. * UPDATE BACK POINTER OF NEXT ENTRY AND FORWARD
  18. * POINTER OF PREVIOUS ENTRY (IF MOVED)
  19. * BY CALLING MCHKPTR.
  20. *
  21. * 4. ENTRY PARAMETERS
  22. * RINGFP - FORWARD RING POINTER
  23. * RINGBP - BACKWARD RING POINTER
  24. * PTR - CURRENT BUFFER LOCATION
  25. *
  26. * 5. EXIT PARAMETERS
  27. * NONE
  28. *
  29. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  30. * NIPDEF DRHDR FREETAB OSIZE
  31. *
  32. * 7. ROUTINES AND OVERLAYS CALLED
  33. * MCHKPTR - UPDATE PTR IF MOVED
  34. * XTRACE - TRACE PROCEDURE CALL
  35. *
  36. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  37. * THIS PROCEDURE IS CALLED BY MAJPTR.
  38. * W A R N I N G - THE TOTAL SIZE OF ALL GARBAGE COLLECTION
  39. * ROUTINES (MAJPTR,MCHKPTR,MGBGCLT AND
  40. * MDRPTR) CANNOT EXCEED THE PRIMARY
  41. * AND SECONDARY
  42. *CALL OSIZE
  43.  #
  44. STOPIMS;
  45.  
  46. #
  47.   INPUT PARAMETERS
  48. #
  49. ITEM RINGFP; # RING FORWARD POINTER #
  50. ITEM RINGBP; # RING BACK POINTER #
  51. ITEM PTR; # NEW POINTER OF RING ENTRY #
  52.  
  53. #
  54.   EXTERNAL REFERENCES
  55. #
  56. XREF
  57. BEGIN
  58. PROC MCHKPTR; # UPDATE PTR IF MOVED #
  59. PROC XTRACE; # TRACE PROCEDURE CALL #
  60. END
  61.  
  62. BEGIN
  63.  
  64. CONTROL IFEQ DEBUG,1;
  65. XTRACE("MDRPT");
  66. CONTROL FI;
  67.  
  68. P<DRHDRWD> = 0;
  69. MCHG = RINGFP; # NEXT RING ENTRY #
  70. IF MCHG NQ 0
  71. THEN
  72. BEGIN
  73. MCHKPTR; # UPDATE POINTER IF MOVED #
  74. BACKPTR[MCHG] = PTR; # UPDATE BACK POINTER OF NEXT ENTRY #
  75. MCHG = RINGBP; # PREVIOUS RING ENTRY #
  76. MCHKPTR; # CHECK WHETHER PREVIOUS RING ENTRY MOVED #
  77. NEXTPTR[MCHG] = PTR; # UPDATE NEXT PTR OF PREV. ENTRY #
  78. END
  79.  
  80. RETURN;
  81. END
  82. TERM
cdc/nos2.source/nam5871/mdrptr.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator