User Tools

Site Tools


cdc:nos2.source:nam5871:nppsm

Table of Contents

NPPSM

Table Of Contents

  • [00017] PRGM NPPSM
  • [00094] PROC ABORT
  • [00095] PROC BLINK
  • [00096] PROC MRELS
  • [00097] PROC OMSG
  • [00098] PROC OSCHAPP
  • [00099] PROC OSREQ
  • [00100] PROC NRCSSTP
  • [00101] PROC XTRACE

Source Code

NPPSM.txt
  1. *DECK NPPSM
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT ACNB
  5. USETEXT AHEADER
  6. USETEXT APPSTAT
  7. USETEXT AT
  8. USETEXT MSGIDX
  9. USETEXT NBT
  10. USETEXT OVERLAY
  11. USETEXT PARAMP
  12. USETEXT PT
  13. USETEXT PCNB
  14. USETEXT PWL
  15. USETEXT SSTCOM
  16. USETEXT SUPMSG
  17. PRGM NPPSM; # PROCESS A PRU INTERFACE SM FROM PIP #
  18. STARTIMS;
  19. #
  20. *1DC NPPSM
  21. *
  22. * 1. PROC NAME AUTHOR DATE
  23. * NPPSM J.C. LEE 80/04/01
  24. *
  25. * 2. FUNCTIONAL DESCRIPTION.
  26. * PROCESS A PRU INTERFACE SUPERVISORY MESSAGE FROM PIP
  27. *
  28. * 3. METHOD USED.
  29. * IF WAITING-FOR-APPLICATION-TO-BE-SWAPPED-IN PWL RING EXISTS,
  30. * LINK PWL TO RING TO MAINTAIN SUPERVISORY MESSAGE SEQUENCE
  31. * FOR THE PRU APPLICATION.
  32. * VALIDATE PFC/SFC OF THE SUPERVISORY MESSAGE
  33. * FOR SWITCH FILE COMMANDS (IFC/EOJ, IFC/ABORT, OFC/EDO AND
  34. * OFC/ABORT), ISSUE SST REQUEST TO SWITCH FILE ASSIGNMENT FROM
  35. * NAM-S CONTROL POINT TO PRU APPLICATION-S CONTROL POINT
  36. * FORMAT ABH
  37. * SEND SUPERVISORY MESSAGE TO PRU APPLICATION
  38. *
  39. * 4. ENTRY PARAMETERS.
  40. * PARAMP1 PRU BUFFER INDEX
  41. * PARAMP2 PCNB ADDRESS
  42. *
  43. * 5. EXIT PARAMETERS.
  44. * PARAMP4 NONZERO IF BAD SUP MSG IN PWL
  45. * PARAMP1 = 0 NORMAL EXIT
  46. * PARAMP1 " 0 ERROR CODE VALUE
  47. * PARAMP2 " 0 NORMAL EXIT
  48. * PARAMP2 = 0 FUNCTION INCOMPLETE, TRY AGAIN LATER.
  49. *
  50. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  51. * NIPDEF ACB ACNB AHEADER
  52. * APPSTAT AT MSGIDX
  53. * PARAMP PT OPSIZE
  54. * PCNB PWL SSTCOM SUPMSG
  55. *
  56. * 7. ROUTINES AND OVERLAYS CALLED
  57. * ABORT ABORT PROGRAM AND DAYFILE MESSAGE
  58. * BLINK LINK DATA BLOCK TO DATA RING
  59. * OMSG DAYFILE MESSAGE
  60. * OSCHAPP SCHEDULE AN APPLICATION
  61. * OSREQ ISSUE RA+1 CALL
  62. * XTRACE TRACE CALLS
  63. *
  64. * 8. DAYFILE MESSAGES.
  65. * NIP/SST RC = XXB,JOBID = XXXX.
  66. *
  67. * THIS PROGRAM IS A PRIMARY OVERLAY LOADED BY SUBROUTINE OVLCALL.
  68. * WHEN EXECUTION HAS COMPLETED, A JUMP IS MADE TO LOCATION RJMAIN
  69. * TO RETURN TO THE CALLING PROGRAM.
  70. *
  71. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
  72. *CALL OPSIZE
  73. *
  74. * THIS OVERLAY IS CALLED BY NPPWL.
  75. *
  76.  #
  77. STOPIMS;
  78. #
  79.   INPUT PARAMETERS,
  80.   PARAMP1 = BUFFER INDEX
  81.   PARAMP2 = PCNB ADDRESS
  82.  
  83.   OUTPUT PARAMETERS,
  84.   PARAMP1 = 0 , INDICATES NORMAL EXIT ,
  85.   PARAMP1 " 0 , INDICATES ERROR CODE VALUE ,
  86.   PARAMP2 " 0 , INDICATES NORMAL EXIT ,
  87.   PARAMP2 = 0 , INDICATES FUNCTION INCOMPLETE, TRY AGAIN LATER.
  88. #
  89. #
  90.   EXTERNAL VARIABLES
  91. #
  92. XREF
  93. BEGIN
  94. PROC ABORT; # ABORT PROGRAM AND DAYFILE MSG #
  95. PROC BLINK; # LINK DATA BLOCK TO DATA RING #
  96. PROC MRELS; # RELEASE BUFFER #
  97. PROC OMSG; # DAYFILE MESSAGE #
  98. PROC OSCHAPP; # SCHEDULE AN APPLICATION #
  99. PROC OSREQ; # ISSUE RA+1 CALL #
  100. PROC NRCSSTP ; # CALL SSTP AND PROCESS REASON CODE #
  101. PROC XTRACE; # TRACE CALLS #
  102. LABEL RJMAIN; # RETURN ADDRESS #
  103. END
  104. #
  105.   INTERNAL VARIABLES
  106. #
  107. ITEM
  108. INDEX, # FOR LOOP INDEX #
  109. REASON, # SST COMPLETION STATUS #
  110. PWLADDR, # PWL ADDRESS #
  111. TLW; # TEXT LENGTH IN WORDS #
  112. #
  113.   TABLE OF PFC/SFC CODES OF PRU INTERFACE SUPERVISORY MESSAGES
  114.   FROM PIP
  115. #
  116. DEF ENDPRUNSM #13# ;
  117. ARRAY PRUNSMTAB[0:ENDPRUNSM];
  118. BEGIN
  119. ITEM PRUNPFCSFC U(0,0,16)= [OFCDATN, IFCJOB, IFCEOJ,
  120. OFCEOO, OFCSTPN,
  121. IFTEND,OFTEND,
  122. IFCSTPD, OFCSTPD, IFCENDN,
  123. IFCABTN, OFCABTN,
  124. ESXOKR ,
  125. XFTIER,
  126. 0];
  127. END
  128. #
  129.   JUMP TABLE FOR PRU INTERFACE SUPERVISORY MESSAGE-S
  130.   PFC/SFC-S FROM NPU DRIVER PIP
  131. #
  132. SWITCH PRUNSMJT
  133. NPSM3,NPSM3,NPSM2,
  134. NPSM2,NPSM3,
  135. NPSM2,NPSM2,
  136. NPSM3,NPSM3,NPSM2,
  137. NPSM2,NPSM2,
  138. NPSM3 ,
  139. NPSM2,
  140. NPSM1;
  141.  
  142. # ******************************************************************** #
  143. BEGIN
  144.  
  145. CONTROL IFEQ DEBUG,1;
  146. XTRACE("NPPSM") ;
  147. CONTROL FI;
  148.  
  149. PWLADDR = PARAMP1; # PWL ADDRESS #
  150. P<PWLHDR> = PWLADDR;
  151. P<PCNB> = PARAMP2; # PCNB ADDRESS #
  152. P<ACNB> = PCNBACNB[0]; # ACNB ADDRESS #
  153. P<SUPMSG> = P<PWLHDR> + BLKHSIZE + PWLHSIZE; # PRU SM ADDRESS #
  154. P<ACB> = ATACBA[ACNBAN[0]]; # ACB ADDRESS #
  155. # APPLICATION ACB ADDRESS #
  156. PARAMP4 = 0; # INITIALIZE BAD SUP MSG FLAG #
  157. #
  158.   IF WAITING-FOR-APPLICATION-TO-BE-SWAPPED-IN PWL RING EXISTS, THEN
  159.   LINK PRU WORKLIST IN THE INBOUND BUFFER TO RING IN ORDER TO
  160.   MAINTAIN SUPERVISORY MESSAGE SEQUENCE FOR THE APPLICATION
  161. #
  162. IF ACBPWLFP[0] NQ 0 AND # PWL RING EXISTS #
  163. PWLID[0] EQ PWLIDVALUE # PWL IN INBOUND BUFFER #
  164. THEN # LINK PWL TO RING #
  165. BEGIN # UPDATE RING POINTERS #
  166. PWLNPWLFP[0] = LOC(ACBPWLFP[0]);
  167. PWLNPWLBP[0] = ACBPWLBP[0];
  168. PWLID[0] = PWLRIDVALUE; # SET PWL RING ID FOR PWL #
  169. P<PWLHDR> = ACBPWLBP[0]; # PREVIOUS LAST PWL IN RING #
  170. PWLNPWLFP[0] = PWLADDR;
  171. ACBPWLBP[0] = PWLADDR;
  172. GOTO RJMAIN; # RETURN TO CALLING ROUTINE #
  173. END
  174. #
  175.   VALIDATE PFC/SFC OF THE PRU INTERFACE SUPERVISORY
  176.   MESSAGE FROM PIP
  177. #
  178. PRUNPFCSFC[ENDPRUNSM] = PFCSFC[0]; # GURANTEE MATCH IN SEARCH #
  179.  
  180. FOR INDEX=0 STEP 1 DO
  181. BEGIN
  182. IF PRUNPFCSFC[INDEX] EQ PFCSFC[0]
  183. THEN # FOUND A PFC/SFC MATCH #
  184. GOTO NPSM0;
  185. END
  186. NPSM0:
  187. #
  188.   SWITCH ON PRU SUPERVISORY MESSAGE-S IFC/SFC
  189. #
  190. GOTO PRUNSMJT[INDEX];
  191. NPSM1:
  192. #
  193.   NO PFC/SFC MATCH FOUND, SET ERROR AND RETURN
  194. #
  195. PARAMP4 = DMCBSM; # BAD SUP MSG IN PWL #
  196. GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
  197. NPSM2:
  198. IF PRUFNT[0] EQ 0
  199. THEN
  200. GOTO NPSM3;
  201. #
  202.   SWITCH FILE COMMANDS IFC/EOJ OR IFC/ABORT OR OFC/EOO OR OFC/ABORT
  203.   OR IFC/END/N ENCOUNTERED, ISSUE SST REQUEST TO SWITCH FILE FROM
  204.   NAM CONTROL POINT TO APPLICATION-S CONTROL POINT.
  205.   PROCESS SCP RETURN CODE.
  206. #
  207. IF PCNBFILE[0] NQ 0
  208. THEN
  209. BEGIN # FILE STILL WITH NAM #
  210. NRCSSTP(P<ACB>,P<PWLHDR>,PRUFNT[0],REASON) ;
  211. IF REASON NQ 0
  212. THEN
  213. GOTO RJMAIN ;
  214. #
  215.   QUEUE FILE NOW TRANSFERRED TO APPLICATION-S CONTROL POINT,
  216.   CLEARS CURRENT QUEUE FILE-S LFN AND FNTO IN PCNB.
  217.   UPDATE FNT ORDINAL IN SUPERVISORY MESSAGE.
  218. #
  219. PCNBFILE[0] = 0;
  220. PRUFNT[0] = SSTFNTR[0];
  221. END # FILE STILL WITH NAM #
  222. ELSE
  223. PRUFNT[0] = 0 ; # FILE NOT WITH NAM, SET FNT = 0 #
  224.  
  225. NPSM3:
  226. #
  227.   FORMAT ABH
  228.   SEND SUPERVISORY MESSAGE TO APPLICATION
  229. #
  230. P<AHEADER> = P<PWLHDR> + BLKHSIZE; # ABH ADDRESS #
  231. ABHWORD[0] = 0; # CLEAR ABH WORD #
  232. ABHABT[0] = APPCMD; # BLOCK TYPE #
  233. ABHACT[0] = CT60TRANS; # CHARACTER TYPE #
  234. TLW = PWLBS[0] - BLKHSIZE - PWLHSIZE; # TEXT LENGTH OF SM #
  235.  
  236. IF TLW GR TLWMAX OR # EXCEEDED MAXIMUM ALLOWED #
  237. TLW LQ 0 # BAD TLW #
  238. THEN # ABNORMAL EXIT #
  239. BEGIN
  240. PARAMP4 = DMCBTL; # BAD TEXT LENGTH FOR SUP MSG #
  241. GOTO RJMAIN;
  242. END
  243. ABHTLC[0] = TLW; # TEXT LENGTH IN CM WORDS #
  244.  
  245. PRUACN[0] = ACNBACN[0]; # SET ACN IN SUPERVISORY MESSAGE#
  246. #
  247.   LINK SUPERVISORY MESSAGE TO APPLICATION-S ACB DATA RING
  248. #
  249. BLINK(P<PWLHDR>, P<ACB>);
  250. #
  251.   SCHEDULE APPLICATION
  252. #
  253. OSCHAPP(P<ACB>);
  254.  
  255. GOTO RJMAIN;
  256. END
  257. TERM
cdc/nos2.source/nam5871/nppsm.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator