User Tools

Site Tools


cdc:nos2.source:nam5871:mreduce

MREDUCE

Table Of Contents

Source Code

MREDUCE.txt
  1. *DECK MREDUCE
  2. IDENT MREDUCE
  3. LIST F
  4. ENTRY MREDUCE
  5. EXT ABORT
  6. EXT MRELS
  7. EXT XTRACE
  8. *IF DEF,IMS
  9. *#
  10. *1DC MREDUCE
  11. * 1. PROC NAME AUTHOR DATE
  12. * MREDUCE P.C.TAM 78/07/10
  13. *
  14. * 2. FUNCTIONAL DESCRIPTION.
  15. * REDUCE THE SIZE OF A BLOCK, AND RELEASE EXTRA SPACE
  16. *
  17. * 3. METHOD USED.
  18. * CHECK THE ORIGINAL BLOCK SIZE, AND THE REQUEST SIZE,
  19. * ABORT WITH ERROR MESSAGE IF EITHER IS ZERO, OR IF OLD
  20. * SIZE IS LESS THAN NEW SIZE WHEN DEBUG IS ON.
  21. * BUILD NEW HEADER, RELEASE EXTRA SPACE.
  22. *
  23. * 4. ENTRY PARAMETER.
  24. * (A1) = ADDRESS OF THE ADDRESS OF BUFFER ADDRESS OF THE BUFFER
  25. * TO BE REDUCED
  26. * (A1)+1 = ADDRESS OF THE ADDRESS OF THE REQUIRED SIZE
  27. *
  28. * 5. EXIT PARAMETER.
  29. * NONE.
  30. *
  31. * 6. COMMON DECKS CALLED.
  32. * CYBERDEFS INPARU FREETAB
  33. *
  34. * 7. ROUTINES CALLED.
  35. * ABORT ABORT NIP
  36. * MRELS RELEASE BUFFER TO FREE POOL
  37. * XTRACE TRACE CALLER
  38. *
  39. * 8. DAYFILE MESSAGES.
  40. * *MREDUCE CALL ERROR* - BUFFER SIZE IS SMALLER THAN
  41. * REQUESTED SIZE, OR BUFFER SIZE
  42. * ZERO, OR REQUEST SIZE ZERO.
  43. *
  44. * W A R N I N G - THIS ROUTINE IS LOADED WITH XPIP,
  45. * XCHKPCR, SDELQTB TOGETHER IN ONE
  46. * OVERLAY. THE SUM OF THEIR PROGRAM
  47. * LENGTHS SHOULD NOT EXCEED THE
  48. *CALL OSIZE
  49. *
  50. *#
  51. *ENDIF
  52.  
  53. *CALL MACDEF
  54. *CALL CYBERDEFS
  55. *CALL INPARU
  56. *CALL FREETAB
  57.  
  58. MREDUCE SUBR = ENTRY/EXIT
  59.  
  60. IFEQ DEBUG,1,6
  61. SX6 A1
  62. SA6 TEMP
  63. SX1 XMREC
  64. RJ XTRACE
  65. SA1 TEMP
  66. SA1 X1
  67.  
  68. SB1 1
  69. SA2 X1 (X2)=BUFADDR
  70. LOAD A3,X2,FRBBS# (X3)=BUFFER HEADER WORD
  71. SA4 A1+B1
  72. SA4 X4 (X4)=REQUEST SIZE
  73.  
  74. IFEQ DEBUG,1,1
  75. ZR X4,RDZ ERROR IF REQUEST SIZE IS ZERO
  76.  
  77. LX3 -FRBBS?+FRBBS$-1 RIGHT JUSTIFY BLOCK SIZE
  78. SX5 X3 (X5)=BLOCK SIZE
  79.  
  80. IFEQ DEBUG,1,1
  81. ZR X5,RDZ ERROR IF BLOCK SIZE IS ZERO
  82.  
  83. IX6 X5-X4 (X6)=BLOCK SIZE-REQUEST SIZE
  84.  
  85. IFEQ DEBUG,1,1
  86. MI X6,RDZ ERROR IF BLOCK SIZE IS LE REQUEST SIZE
  87.  
  88. BX7 X3-X5
  89. LX6 FRBBS?-FRBBS$+1 BLOCK HEADER FOR RELEASING BLOCK
  90. BX7 X7+X4
  91. SB2 X2 (B2)=BUFADDR
  92. LX7 FRBBS?-FRBBS$+1 BLOCK HEADER FOR BUFADDR BLOCK
  93. SB2 B2+X4 (B2)=ADDR OF RELEASING BUFFER
  94. SA7 X2 SET NEW HEADER FOR BUFADDR BLOCK
  95. SA6 B2 SET HEADER FOR RELEASING BLOCK
  96. SX6 B2
  97. SA6 RLPM
  98. SA1 RLPMD
  99. RJ MRELS RELEASING EXTRA SPACE
  100. EQ MREDUCEX RETURN
  101.  
  102. RDF2 IFEQ DEBUG,1
  103. RDZ BSS 0
  104. SA1 MSGDR
  105. RJ ABORT *----ABORT---*
  106.  
  107. MSGDR VFD 60/MSGD
  108. BSSZ 1
  109. MX0 30 PROTECT LOWER BITS
  110. BX7 X7*X0
  111. MSGD DATA L*MREDUCE CALL ERROR*
  112. XMREC DATA L*MREDU*
  113. TEMP BSS 1
  114. RDF2 ENDIF
  115.  
  116. RLPMD VFD 60/RLPM
  117. RLPM BSSZ 1
  118.  
  119. END
cdc/nos2.source/nam5871/mreduce.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator