User Tools

Site Tools


cdc:nos2.source:nam5871:ns_n06

NS$N06

Table Of Contents

  • [00010] PROC NS$N06(ERRCODE)
  • [00012] NS$N06 - PROCESS NPU/DT/N (DUMP).
  • [00016] PROCESS NPU/DT/N (DUMP).
  • [00055] PROC NS$DBG
  • [00061] FUNC NS$FEC U
  • [00062] PROC NS$SDB
  • [00063] PROC NS$SLT
  • [00064] PROC NS$XPD
  • [00065] PROC TSBINFO
  • [00066] PROC WRITEW

Source Code

NS$N06.txt
  1. *DECK NS$N06
  2. USETEXT CYB$NS
  3. USETEXT DTSB$NS
  4. USETEXT ERR$NS
  5. USETEXT NAT$NS
  6. USETEXT NDF$NS
  7. USETEXT SMB$NS
  8. USETEXT SMD$NS
  9.  
  10. PROC NS$N06(ERRCODE); # PROCESS NPU/DT/N (DUMP) #
  11.  
  12. # TITLE NS$N06 - PROCESS NPU/DT/N (DUMP). #
  13.  
  14. BEGIN # NS$N06 #
  15. #
  16. ** NS$N06 - PROCESS NPU/DT/N (DUMP).
  17. *
  18. * J.C. LEE 1981
  19. *
  20. * THIS ROUTINE PROCESSES NPU/DT/N (DUMP).
  21. *
  22. *
  23. * PROC NS$N06(ERRCODE)
  24. *
  25. * ENTRY:
  26. * NONE.
  27. *
  28. * EXIT:
  29. * ERRCODE.
  30. *
  31. * METHOD:
  32. * DECREMENT DUMP BATCH COUNT (DBC)
  33. * CALCULATE DUMP DATA HEX WORDS.
  34. * IF DUMP DATA WITHIN LIMIT AND DBC NOT YET EXHAUSTED:
  35. * CLEAR RETRY COUNT.
  36. * FORMAT DUMP PACKET ENTRY.
  37. * TRANSFER DUMP PACKET TO DUMP TSB.
  38. * UPDATE DBC.
  39. * IF DBC EQ 0
  40. * IF DUMP DIRECTIVE COMPLETE
  41. * PROCESS NEXT DPCB DIRECTIVE.
  42. * ELSE
  43. * START DUMP DATA.
  44. * START LOCAL TIMER.
  45. * ELSE
  46. * SET ERRCODE TO "BAD DUMP RESPONSE FROM NPU".
  47. *
  48. #
  49.  
  50. ITEM ERRCODE U; # ERRCODE #
  51.  
  52. $BEGIN
  53. XREF
  54. BEGIN
  55. PROC NS$DBG; # TRACE PROCEDURE CALL #
  56. END
  57. $END
  58.  
  59. XREF
  60. BEGIN
  61. FUNC NS$FEC U; # FORMAT ERROR CODE #
  62. PROC NS$SDB; # SEND DUMP BATCH #
  63. PROC NS$SLT; # START RESPONSE TIMER #
  64. PROC NS$XPD; # PROCESS NEXT XPCB DIRECTIVE #
  65. PROC TSBINFO; # LOCATE TSB #
  66. PROC WRITEW; # WRITEW DATA TRANSFER MACRO CALL #
  67. END
  68.  
  69. ITEM CMWORDS U; # NUMBER OF CM WORDS IN NPU DUMP DATA #
  70. ITEM DBC U; # DUMP BATCH COUNT #
  71. ITEM I I; # TEMPORARY VARIABLE #
  72. ITEM J I; # TEMPORARY VARIABLE #
  73. ITEM NPUWORDS U; # NUMBER OF NPU WORDS IN DUMP RESPONSE #
  74. ITEM TSBFWA U; # FWA OF TSB #
  75. ITEM TSBSIZE U; # TSB SIZE #
  76.  
  77. BASED ARRAY DSM$DATA [1:MAX$DPSIZE] S(1);
  78. BEGIN # DUMP DATA WORD FORMAT IN DUMP RESPONSE #
  79. ITEM DSM$DATA1 U(00,20,40); # DUMP DATA IN FIRST WORD #
  80. ITEM DSM$DATA2 U(00,00,20); # DUMP DATA IN NEXT WORD #
  81. END
  82.  
  83. BASED ARRAY NDF$DPDATA [1:MAX$DPSIZE] S(1);
  84. BEGIN # DUMP PACKET DATA FORMAT #
  85. ITEM DPD$DATAWD U(00,00,60);
  86. ITEM DPD$DATA1 U(00,00,40);
  87. ITEM DPD$DATA2 U(00,40,20);
  88. END
  89.  
  90. CONTROL EJECT;
  91.  
  92. $BEGIN
  93. NS$DBG("N06"); # TRACE CALL #
  94. $END
  95.  
  96. ERRCODE = 0;
  97. DBC = NAT$BC[0] - 1; # DECREMENT DUMP BATCH COUNT #
  98. NPUWORDS = (ABHTLC[0] - LNPUDTDN + 1) / 2; # DUMP DATA HEX WORDS #
  99.  
  100. IF NPUWORDS LQ MAX$DPHWDS # DUMP DATA WITHIN ALLOWED LIMIT#
  101. AND DBC GQ 0 # DUMP BATCH NOT YET EXHAUSTED #
  102. THEN # VALID DUMP RESPONSE #
  103. BEGIN
  104. NAT$RETRYS[0] = 0;
  105. #
  106.   FORMAT DUMP PACKET ENTRY
  107. #
  108. P<NDF$DPHDR> = LOC(ABH$WORD); # FWA OF DUMP PACKET HEADER #
  109. CMWORDS = (NPUWORDS*16 + (WL-1)) / WL; # DUMP DATA CM WORDS #
  110. DPH$WORD[0] = 0;
  111. DPH$WC[0] = CMWORDS + L$DPHDR; # CM WORD COUNT OF ENTRY #
  112. DPH$NC[0] = NPUWORDS; # HEX WORD COUNT OF ENTRY #
  113. DPH$BA1[0] = NPUBA1[0]; # DUMP PACKET BEGINNING ADDRESS #
  114. DPH$BA2[0] = NPUBA2[0];
  115.  
  116. P<NDF$DPDATA> = LOC(SMB$BUFFER); # FWA OF DUMP PACKET DATA #
  117. P<DSM$DATA> = LOC(SMB$BUFFER) + (((2*LNPUDTDN+14)/15) - 1);
  118. J = 1;
  119.  
  120. FOR I=1 STEP 1 UNTIL CMWORDS
  121. DO
  122. BEGIN # MOVE DUMP DATA FROM SM TO DUMP PACKET #
  123. DPD$DATA1[I] = DSM$DATA1[J];
  124. J = J + 1;
  125. DPD$DATA2[I] = DSM$DATA2[J];
  126. END
  127. #
  128.   TRANSFER DUMP PACKET TO DUMP TSB
  129. #
  130. TSBINFO(TSBSIZE,TSBFWA,NAT$NDTSBN[0]); # LOCATE DUMP TSB #
  131. P<DTSB$FET> = TSBFWA + L$DTSBHDR; # FWA OF FET #
  132. WRITEW(DTSB$FET,NDF$DPHDR,L$DPHDR+CMWORDS); # TRANSFER PACKET #
  133. NAT$BC[0] = DBC; # UPDATE DUMP BATCH COUNT #
  134.  
  135. IF DBC EQ 0
  136. THEN # WHOLE DUMP BATCH RECEIVED #
  137. BEGIN
  138. IF NAT$F$DP[0]
  139. THEN # DUMP DIRECTIVE COMPLETES #
  140. BEGIN
  141. NS$XPD(ERRCODE); # PROCESS NEXT DPCB DIRECTIVE #
  142. END
  143.  
  144. ELSE # MORE DATA TO DUMP #
  145. BEGIN
  146. NS$SDB; # SEND DUMP BATCH #
  147. NS$SLT; # START RESPONSE TIMER #
  148. END
  149. END
  150.  
  151. END
  152.  
  153. ELSE # BAD DUMP RESPONSE FROM NPU #
  154. BEGIN
  155. ERRCODE = NS$FEC(EC"ERR$SM",SMEC"NSM$DMP");
  156. END
  157.  
  158. RETURN;
  159. END # NS$N06 #
  160. TERM
cdc/nos2.source/nam5871/ns_n06.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator