cdc:nos2.source:nam5871:cssams
Table of Contents
CSSAMS
Table Of Contents
- [00008] PROC CSSAMS
- [00009] CSSAMS - ACTION MULTIPLE SEND COMMAND.
- [00013] ACTION MULTIPLE SEND COMMAND.
- [00035] PROC MOVE
- [00036] PROC MOVEI
- [00037] PROC SSTAQE
- [00038] PROC SSBEBF
- [00039] PROC SSBSBF
- [00040] PROC SSBSBW
- [00041] FUNC SSDCDA
Source Code
- CSSAMS.txt
- *DECK CSSAMS
- USETEXT TEXTSS;
- USETEXT TEXTCS;
- USETEXT TXCMDCS;
- USETEXT TXTAPSS;
- USETEXT TXTSUSS;
- USETEXT TXTSMCS;
- PROC CSSAMS;
- # TITLE CSSAMS - ACTION MULTIPLE SEND COMMAND. #
- BEGIN # CSSAMS #
- #
- ** CSSAMS - ACTION MULTIPLE SEND COMMAND.
- *
- * C. BRION 82/09/16.
- *
- * THIS PROCEDURE PROCESSES THE SEND,NPS COMMAND.
- *
- * PROC CSSAMS
- *
- * ENTRY HDRCMD - COMMAND HEADER WORD.
- *
- * EXIT NPUCB - MAY BE UPDATED FOR EACH SUPERVISED NPU.
- * OCB - THE OCB FOR THE COMMAND OPERATOR MAY BE UPDATED.
- * A TEXT MESSAGE MAY BE SENT TO THE OPERATOR.
- * ONE OR MORE MSG/NP SUPERVISORY MESSAGES MAY BE SENT.
- *
- #
- #
- **** PROC CSSAMS XREF LIST
- #
- XREF
- BEGIN
- PROC MOVE; # MACREL MOVE ROUTINE #
- PROC MOVEI; # MACREL MOVE INDIRECT #
- PROC SSTAQE; # SS ACCEPT QUEUE ENTRY #
- PROC SSBEBF; # SS EXTRACT BIT FIELD #
- PROC SSBSBF; # SS STORE BIT FIELD #
- PROC SSBSBW; # SS SET BIT IN WORD #
- FUNC SSDCDA; # SS CONVERT DIS TO ASCII #
- END
- #
- ****
- #
- DEF N1SENDL$ # 4 #;
- DEF N2SENDL$ # 5 #;
- DEF US$ # X"1F" #;
- #
- * ITEM LIST
- #
- ITEM ORD I; # OCB ORDINAL #
- ITEM NORD I; # NPU ORDINAL #
- ITEM AORD I; # CHAR CONV VAR #
- ITEM ABIT I;
- ITEM DBIT I;
- ITEM DORD I;
- ITEM I I; # LOOP VAR #
- ITEM SCHAR U; # CHARACTER TEMP CELL #
- ITEM BSYIX I; # BEGINNING SYN INDEX VAR #
- ITEM Y I; # LOCAL WORKING VAR #
- #
- * FLG$WORD - A BASED ARRAY THAT POINTS TO THE PENDING SEND BIT
- * MAPS IN THE NPUCB-S.
- #
- BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$);
- BEGIN
- ITEM FW$WORD I(00,00,60);
- END
- #
- * FROMNOP - HEADER TEXT PREFIX FOR HOST BROADCAST MSG.
- #
- ARRAY FROMNOP [00:00] S(1);
- BEGIN
- ITEM FRO$TXT C(00,00,10) = ["FROM NOP.."];
- END
- #
- * THIS MESSAGE IS SENT WHEN NO SEND WAS ACTIONED BECAUSE THERE
- * ARE NO NPUS CURRENTLY BEING SUPERVISED.
- #
- DEF LNONPUS # 04 #; # NUMBER OF WORD IN MESSAGE #
- ARRAY NONPUS [00:00] S(LNONPUS);
- BEGIN
- ITEM NNP$MSG1 C(00,00,20) = ["NO NPUS ARE BEING SU"];
- ITEM NNP$MSG2 C(02,00,10) = ["PERVISED"];
- ITEM NNP$ZFIL I(03,00,60) = [0];
- END
- #
- * MAIN PROCEDURE STARTS HERE.
- #
- ORD = HDR$OPORD[0]; # SET OCB ORDINAL #
- ABHWORD[1] = 0; # CLEAR ABH AND WC WORDS #
- WCB$WORD[1] = 0;
- PFCSFC[1] = MSGNP; # SET UP OUTGOING SM AREA #
- ABHABT[1] = APPSUP;
- ABHBT[1] = APPSUP;
- #
- * SET UP THE ABH WORD FOR OUTGOING SM (MSG/NP).
- #
- PFCSFC[1] = MSGNP;
- ABHABT[1] = APPSUP;
- ABHBT[1] = APPSUP;
- ABHACT[1] = ACTCSNP$;
- ABHTLC[1] = 2;
- #
- * SET THE OUTGOING SM IDENTIFIER.
- #
- WCB$SMID[1] = SMID"MSGNP";
- #
- * SET UP THE ASCII PORTION OF THE OUTGOING SM BY CONVERTING
- * THE HEADER TEXT AND MESSAGE TEXT TO ASCII INTO THE SM.
- #
- AORD = 0;
- ABIT = 16;
- DORD = 0;
- DBIT = 0;
- FOR I = 1 STEP 1 UNTIL 10
- DO
- BEGIN
- SSBEBF(FRO$TXT[0],DORD,DBIT,6,SCHAR);
- SCHAR = SSDCDA(SCHAR);
- SSBSBF(CSSM[1],AORD,ABIT,8,SCHAR);
- END
- #
- * DETERMINE POSITION OF MSG TEXT IN COMMAND BLOCK.
- #
- BSYIX = HDR$TXWCNT[0] + 1;
- FOR I = BSYIX STEP 1 WHILE PAR$PCODE[I] NQ "MS0"
- DO
- BEGIN
- END
- DORD = I + 1;
- #
- * MOVE MSG TEXT INTO SM BODY AFTER ASCII CONVERSION.
- #
- FOR Y = 1 STEP 1 UNTIL PAR$MSGCL[I]
- DO
- BEGIN
- SSBEBF(PARMS[0],DORD,DBIT,6,SCHAR);
- SCHAR = SSDCDA(SCHAR);
- SSBSBF(CSSM[1],AORD,ABIT,8,SCHAR);
- END
- SCHAR = US$;
- SSBSBF(CSSM[1],AORD,ABIT,8,SCHAR);
- #
- * SET THE TEXT LENGTH OF SM IN CHARACTERS.
- #
- ABHTLC[1] = ABHTLC[1] + PAR$MSGCL[I] + 11;
- WCB$WC[1] = ((ABHTLC[1] * 8)/60) + 3;
- #
- * SAVE THE SM IN THE OPERATOR CONTROL BLOCK.
- #
- OC$WC[ORD] = WCB$WC[1] - 2;
- OC$TLC[ORD] = ABHTLC[1];
- MOVEI(OC$WC[ORD],LOC(CSSM[1]),LOC(OC$SM[ORD]));
- #
- * SEARCH THE NPUCB ARRAY FOR EACH NPUCB THAT IS SUPERVISED AND
- * NOT BUSY WITH ANOTHER BROADCAST COMMAND.
- #
- FOR NORD = 0 STEP 1 UNTIL CSNPCNT - 1
- DO
- BEGIN
- IF NPU$STAT[NORD] EQ SUPSTAT"SUP" AND
- (ORD EQ HOPORD$ OR ORD EQ NPU$CNOP[NORD])
- THEN
- BEGIN
- P<FLG$WORD> = LOC(NPU$SDFLGS[NORD]);
- SSBSBW(FLG$WORD,ORD);
- #
- * INCREMENT THE NUMBER OF SEND NPUS AFFECTED BY THIS COMMAND.
- #
- OC$NCNT[ORD] = OC$NCNT[ORD] + 1;
- #
- * IF THE NPU IS NOT BUSY WITH ANOTHER SEND COMMAND, THEN SEND
- * THEN MESSAGE.
- #
- IF NPU$OPSD[NORD] EQ 0
- THEN
- BEGIN
- #
- * SET THE SEND OPERATOR IN THE NPUCB.
- #
- NPU$OPSD[NORD] = ORD;
- #
- * SEND THE MSG/NP SM
- #
- ABHDN[1] = NPU$NID[NORD];
- ABHSN[1] = NPU$HID[NORD];
- SSTAQE(P<OTQ>,WCBUF[1],ABH[1],CSSM[1]);
- END
- END
- END
- #
- * IF THE AFFECTED NPU COUNT IS ZERO THEN THERE ARE NO NPUS BEING
- * SUPERVISED. SEND A MESSAGE INDICATING SO AND CAUSE A *READY*
- * TO GO TO OPERATOR. #
- #
- IF OC$NCNT[ORD] EQ 0
- THEN
- BEGIN
- WCB$WORD[1] = LNONPUS + 2;
- WCB$SMID[1] = SMID"TTEXT";
- WCB$IAF[1] = TRUE;
- ABHWORD[1] = 0;
- ABHADR[1] = HOPORD$;
- SSTAQE(P<CNQ>,WCBUF[1],ABH[1],NONPUS);
- END
- WCB$WORD[1] = 0;
- ABHWORD[1] = 0;
- #
- * SEND THE COMMAND TEXT TO THE NETWORK LOG FILE VIA AN EVENT.
- #
- P<MSCMD> = LOC(CMD$TEXT[0]);
- CMD$TNAM[0] = OC$TNAM[ORD];
- MOVE(HDR$TXWCNT[0],PARMS[0],MSCMD[0]);
- WCB$SMID[1] = SMID"CMDTXT";
- WCB$WC[1] = HDR$TXWCNT[0] + 4;
- SSTAQE(P<EVQ>,WCBUF[1],ABH[1],CMDLINE[0]);
- END #CSSAMS#
- TERM
cdc/nos2.source/nam5871/cssams.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator