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
- *DECK NPPSM
- USETEXT NIPDEF
- USETEXT ACB
- USETEXT ACNB
- USETEXT AHEADER
- USETEXT APPSTAT
- USETEXT AT
- USETEXT MSGIDX
- USETEXT NBT
- USETEXT OVERLAY
- USETEXT PARAMP
- USETEXT PT
- USETEXT PCNB
- USETEXT PWL
- USETEXT SSTCOM
- USETEXT SUPMSG
- PRGM NPPSM; # PROCESS A PRU INTERFACE SM FROM PIP #
- STARTIMS;
- #
- *1DC NPPSM
- *
- * 1. PROC NAME AUTHOR DATE
- * NPPSM J.C. LEE 80/04/01
- *
- * 2. FUNCTIONAL DESCRIPTION.
- * PROCESS A PRU INTERFACE SUPERVISORY MESSAGE FROM PIP
- *
- * 3. METHOD USED.
- * IF WAITING-FOR-APPLICATION-TO-BE-SWAPPED-IN PWL RING EXISTS,
- * LINK PWL TO RING TO MAINTAIN SUPERVISORY MESSAGE SEQUENCE
- * FOR THE PRU APPLICATION.
- * VALIDATE PFC/SFC OF THE SUPERVISORY MESSAGE
- * FOR SWITCH FILE COMMANDS (IFC/EOJ, IFC/ABORT, OFC/EDO AND
- * OFC/ABORT), ISSUE SST REQUEST TO SWITCH FILE ASSIGNMENT FROM
- * NAM-S CONTROL POINT TO PRU APPLICATION-S CONTROL POINT
- * FORMAT ABH
- * SEND SUPERVISORY MESSAGE TO PRU APPLICATION
- *
- * 4. ENTRY PARAMETERS.
- * PARAMP1 PRU BUFFER INDEX
- * PARAMP2 PCNB ADDRESS
- *
- * 5. EXIT PARAMETERS.
- * PARAMP4 NONZERO IF BAD SUP MSG IN PWL
- * PARAMP1 = 0 NORMAL EXIT
- * PARAMP1 " 0 ERROR CODE VALUE
- * PARAMP2 " 0 NORMAL EXIT
- * PARAMP2 = 0 FUNCTION INCOMPLETE, TRY AGAIN LATER.
- *
- * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
- * NIPDEF ACB ACNB AHEADER
- * APPSTAT AT MSGIDX
- * PARAMP PT OPSIZE
- * PCNB PWL SSTCOM SUPMSG
- *
- * 7. ROUTINES AND OVERLAYS CALLED
- * ABORT ABORT PROGRAM AND DAYFILE MESSAGE
- * BLINK LINK DATA BLOCK TO DATA RING
- * OMSG DAYFILE MESSAGE
- * OSCHAPP SCHEDULE AN APPLICATION
- * OSREQ ISSUE RA+1 CALL
- * XTRACE TRACE CALLS
- *
- * 8. DAYFILE MESSAGES.
- * NIP/SST RC = XXB,JOBID = XXXX.
- *
- * 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
- *CALL OPSIZE
- *
- * THIS OVERLAY IS CALLED BY NPPWL.
- *
- #
- STOPIMS;
- #
- INPUT PARAMETERS,
- PARAMP1 = BUFFER INDEX
- PARAMP2 = PCNB ADDRESS
- OUTPUT PARAMETERS,
- PARAMP1 = 0 , INDICATES NORMAL EXIT ,
- PARAMP1 " 0 , INDICATES ERROR CODE VALUE ,
- PARAMP2 " 0 , INDICATES NORMAL EXIT ,
- PARAMP2 = 0 , INDICATES FUNCTION INCOMPLETE, TRY AGAIN LATER.
- #
- #
- EXTERNAL VARIABLES
- #
- XREF
- BEGIN
- PROC ABORT; # ABORT PROGRAM AND DAYFILE MSG #
- PROC BLINK; # LINK DATA BLOCK TO DATA RING #
- PROC MRELS; # RELEASE BUFFER #
- PROC OMSG; # DAYFILE MESSAGE #
- PROC OSCHAPP; # SCHEDULE AN APPLICATION #
- PROC OSREQ; # ISSUE RA+1 CALL #
- PROC NRCSSTP ; # CALL SSTP AND PROCESS REASON CODE #
- PROC XTRACE; # TRACE CALLS #
- LABEL RJMAIN; # RETURN ADDRESS #
- END
- #
- INTERNAL VARIABLES
- #
- ITEM
- INDEX, # FOR LOOP INDEX #
- REASON, # SST COMPLETION STATUS #
- PWLADDR, # PWL ADDRESS #
- TLW; # TEXT LENGTH IN WORDS #
- #
- TABLE OF PFC/SFC CODES OF PRU INTERFACE SUPERVISORY MESSAGES
- FROM PIP
- #
- DEF ENDPRUNSM #13# ;
- ARRAY PRUNSMTAB[0:ENDPRUNSM];
- BEGIN
- ITEM PRUNPFCSFC U(0,0,16)= [OFCDATN, IFCJOB, IFCEOJ,
- OFCEOO, OFCSTPN,
- IFTEND,OFTEND,
- IFCSTPD, OFCSTPD, IFCENDN,
- IFCABTN, OFCABTN,
- ESXOKR ,
- XFTIER,
- 0];
- END
- #
- JUMP TABLE FOR PRU INTERFACE SUPERVISORY MESSAGE-S
- PFC/SFC-S FROM NPU DRIVER PIP
- #
- SWITCH PRUNSMJT
- NPSM3,NPSM3,NPSM2,
- NPSM2,NPSM3,
- NPSM2,NPSM2,
- NPSM3,NPSM3,NPSM2,
- NPSM2,NPSM2,
- NPSM3 ,
- NPSM2,
- NPSM1;
- # ******************************************************************** #
- BEGIN
- CONTROL IFEQ DEBUG,1;
- XTRACE("NPPSM") ;
- CONTROL FI;
- PWLADDR = PARAMP1; # PWL ADDRESS #
- P<PWLHDR> = PWLADDR;
- P<PCNB> = PARAMP2; # PCNB ADDRESS #
- P<ACNB> = PCNBACNB[0]; # ACNB ADDRESS #
- P<SUPMSG> = P<PWLHDR> + BLKHSIZE + PWLHSIZE; # PRU SM ADDRESS #
- P<ACB> = ATACBA[ACNBAN[0]]; # ACB ADDRESS #
- # APPLICATION ACB ADDRESS #
- PARAMP4 = 0; # INITIALIZE BAD SUP MSG FLAG #
- #
- IF WAITING-FOR-APPLICATION-TO-BE-SWAPPED-IN PWL RING EXISTS, THEN
- LINK PRU WORKLIST IN THE INBOUND BUFFER TO RING IN ORDER TO
- MAINTAIN SUPERVISORY MESSAGE SEQUENCE FOR THE APPLICATION
- #
- IF ACBPWLFP[0] NQ 0 AND # PWL RING EXISTS #
- PWLID[0] EQ PWLIDVALUE # PWL IN INBOUND BUFFER #
- THEN # LINK PWL TO RING #
- BEGIN # UPDATE RING POINTERS #
- PWLNPWLFP[0] = LOC(ACBPWLFP[0]);
- PWLNPWLBP[0] = ACBPWLBP[0];
- PWLID[0] = PWLRIDVALUE; # SET PWL RING ID FOR PWL #
- P<PWLHDR> = ACBPWLBP[0]; # PREVIOUS LAST PWL IN RING #
- PWLNPWLFP[0] = PWLADDR;
- ACBPWLBP[0] = PWLADDR;
- GOTO RJMAIN; # RETURN TO CALLING ROUTINE #
- END
- #
- VALIDATE PFC/SFC OF THE PRU INTERFACE SUPERVISORY
- MESSAGE FROM PIP
- #
- PRUNPFCSFC[ENDPRUNSM] = PFCSFC[0]; # GURANTEE MATCH IN SEARCH #
- FOR INDEX=0 STEP 1 DO
- BEGIN
- IF PRUNPFCSFC[INDEX] EQ PFCSFC[0]
- THEN # FOUND A PFC/SFC MATCH #
- GOTO NPSM0;
- END
- NPSM0:
- #
- SWITCH ON PRU SUPERVISORY MESSAGE-S IFC/SFC
- #
- GOTO PRUNSMJT[INDEX];
- NPSM1:
- #
- NO PFC/SFC MATCH FOUND, SET ERROR AND RETURN
- #
- PARAMP4 = DMCBSM; # BAD SUP MSG IN PWL #
- GOTO RJMAIN; # RETURN TO CALLING PROGRAM #
- NPSM2:
- IF PRUFNT[0] EQ 0
- THEN
- GOTO NPSM3;
- #
- SWITCH FILE COMMANDS IFC/EOJ OR IFC/ABORT OR OFC/EOO OR OFC/ABORT
- OR IFC/END/N ENCOUNTERED, ISSUE SST REQUEST TO SWITCH FILE FROM
- NAM CONTROL POINT TO APPLICATION-S CONTROL POINT.
- PROCESS SCP RETURN CODE.
- #
- IF PCNBFILE[0] NQ 0
- THEN
- BEGIN # FILE STILL WITH NAM #
- NRCSSTP(P<ACB>,P<PWLHDR>,PRUFNT[0],REASON) ;
- IF REASON NQ 0
- THEN
- GOTO RJMAIN ;
- #
- QUEUE FILE NOW TRANSFERRED TO APPLICATION-S CONTROL POINT,
- CLEARS CURRENT QUEUE FILE-S LFN AND FNTO IN PCNB.
- UPDATE FNT ORDINAL IN SUPERVISORY MESSAGE.
- #
- PCNBFILE[0] = 0;
- PRUFNT[0] = SSTFNTR[0];
- END # FILE STILL WITH NAM #
- ELSE
- PRUFNT[0] = 0 ; # FILE NOT WITH NAM, SET FNT = 0 #
- NPSM3:
- #
- FORMAT ABH
- SEND SUPERVISORY MESSAGE TO APPLICATION
- #
- P<AHEADER> = P<PWLHDR> + BLKHSIZE; # ABH ADDRESS #
- ABHWORD[0] = 0; # CLEAR ABH WORD #
- ABHABT[0] = APPCMD; # BLOCK TYPE #
- ABHACT[0] = CT60TRANS; # CHARACTER TYPE #
- TLW = PWLBS[0] - BLKHSIZE - PWLHSIZE; # TEXT LENGTH OF SM #
- IF TLW GR TLWMAX OR # EXCEEDED MAXIMUM ALLOWED #
- TLW LQ 0 # BAD TLW #
- THEN # ABNORMAL EXIT #
- BEGIN
- PARAMP4 = DMCBTL; # BAD TEXT LENGTH FOR SUP MSG #
- GOTO RJMAIN;
- END
- ABHTLC[0] = TLW; # TEXT LENGTH IN CM WORDS #
- PRUACN[0] = ACNBACN[0]; # SET ACN IN SUPERVISORY MESSAGE#
- #
- LINK SUPERVISORY MESSAGE TO APPLICATION-S ACB DATA RING
- #
- BLINK(P<PWLHDR>, P<ACB>);
- #
- SCHEDULE APPLICATION
- #
- OSCHAPP(P<ACB>);
- GOTO RJMAIN;
- END
- TERM
cdc/nos2.source/nam5871/nppsm.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator