*DECK CSSADL USETEXT TEXTCS; USETEXT TEXTSS; USETEXT TXCMDCS; USETEXT TXTAPSS; USETEXT TXTSUSS; USETEXT TXTSMCS; PROC CSSADL; # TITLE CSSADL - ACTION DUMP LOAD COMMAND. # BEGIN # CSSADL # # ** CSSADL - ACTION DUMP LOAD COMMAND. * * C. BRION 82/05/26. * * THIS PROCEDURE PROCESSES THE DUMP OR THE LOAD COMMAND. * THE NPU INITIALIZE SM MAY BE SENT TO THE NPU AND/OR * A SUPERVISION EVENT TO LOG THE COMMAND MAY BE SENT TO * THE EVENT PROCESSOR. * * PROC CSSADL * * ENTRY: * THE ROUTED COMMAND HAS BEEN EXTRACTED FROM THE ROUTED COMMAND * QUEUE AND STORED INTO THE COMMON STORAGE AS FOLLOWS: * WCBUF = ONE WORD ENTRY WORD COUNT. * HDRCMD = ONE WORD COMMAND HEADER DESCRIPTOR. * PARMS = ARRAY THAT CONTAINS THE COMMAND TEXT, THE SYNTAX * PARAMETER LIST AND THE ADDRESS PARAMETER LIST. * * EXIT: * A NPU INITIALIZATION SM MAY BE SENT. * A SUPERVISION EVENT TO LOG THE COMMAND MAY BE SENT. * THE NPUCB DUMP AND LOAD REQUEST FLAGS MAY BE UPDATED. * # # **** PROC CSSADL XREF LIST # XREF BEGIN PROC SSTAQE; # SS - ACCEPT QUEUE ENTRY # PROC MESSAGE; # MACREL MSG TO DAYFILE # PROC ABORT; # MACREL ABORT # PROC MOVE; # MACREL MOVE MEMORY # END # **** # # * DEFS # DEF NPUIDX # HDR$TXWCNT[0] + 2 #;# INDEX INTO PARAM LIST FOR NPU # # * ITEMS # ITEM BEGAPIX U; # START ADDR PARAMETER INDEX # ITEM BEGNPU I; # STARTING NPUCB ORDINAL # ITEM ENDNPU I; # ENDING NPUCB ORDINAL # ITEM I U; # LOOP VARIABLE # ITEM BEGSYIX U; # START INDEX OF SYNLIST# ITEM FINSYIX U; # END INDEX OF SYN LIST # ITEM FINALIX U; # LAST ADDR PARAMETER INDEX # ITEM MATCH B; # MATCH INDICATOR # ITEM NPUORD U; # NPU ORDINAL # ITEM ONF B; # ON FLAG INDICATOR # ITEM OFFF B; # OFF FLAG INDICATOR # ITEM MOVCNT U; # MOVE CHAR COUNT # # * SET THE INITIAL ADDRESS PARAMETER LIST BEGINNING AND ENDING * INDEX. # BEGAPIX = HDR$SPCNT[0] + HDR$TXWCNT[0]; FINALIX = BEGAPIX + HDR$APCNT[0]; BEGSYIX = HDR$TXWCNT[0]; FINSYIX = BEGSYIX + HDR$SPCNT[0]; # * CLEAR THE OUTGOING SM STORAGE AREAS. # WCB$WORD[1] = 0; ABHWORD[1] = 0; SPMSG0[1] = 0; # * IF THIS COMMAND IS FOR ONLY ONE NPU, THEN SEARCH FOR THE NPUCB * ORDINAL IN THE ADDRESS PARAMETER LIST AND SET THE BEGINNING AND * ENDING NPU ORDINAL TO THE ORDINAL IN THE PARAMETER LIST. * # IF PAR$PCODE[NPUIDX] EQ "NP0" THEN BEGIN FOR I = BEGAPIX STEP 1 WHILE (I LS FINALIX AND PAR$PCODE[I] NQ "NOR") DO BEGIN END BEGNPU = PAR$ORD[I]; ENDNPU = BEGNPU; END # * IF THIS COMMAND IS FOR MULTIPLE NPUS, THEN SET THE BEGINNING AND * ENDING NPUCB ORDINALS TO BE THE FIRST AND LAST NPU CONTROL * BLOCK. # ELSE BEGIN BEGNPU = 0; ENDNPU = CSNPCNT - 1; END # * CHECK ADDRESS PARAMETER LIST FOR THE PRESENCE OF THE ON OR OFF * KEYWORDS. # OFFF = FALSE; ONF = FALSE; FOR I = BEGSYIX STEP 1 WHILE (I LS FINSYIX AND NOT ONF AND NOT OFFF) DO BEGIN IF PAR$PCODE[I] EQ "ON0" THEN ONF = TRUE; ELSE IF PAR$PCODE[I] EQ "OFF" THEN OFFF = TRUE; END NPIDPP[1] = O"116"; IF ONF THEN NPIDPP[1] = O"131"; # SET TO ASCII Y # # * PREPARE THE OUTGOING NPU INITIALIZATION SM. # IF HDR$VERB[0] EQ "LO0" # IF LOAD, SET NPI IN PFCSFC # THEN BEGIN PFCSFC[1] = NPIIN; IF NOT ONF AND NOT OFFF THEN BEGIN NPIDPP[1] = 0; END END ELSE BEGIN PFC[1] = NPI; SFC[1] = DP; END ABHABT[1] = APPSUP; ABHBT[1] = APPSUP; ABHACT[1] = ACTCSNP$; ABHTLC[1] = NNPI; WCB$WC[1] = LNPI + 2; WCB$SMID[1] = SMID"NPIIN"; # * FOR EACH NPUCB SPECIFIED BY THE BEGINNING AND ENDING ORDINALS. # FOR NPUORD=BEGNPU STEP 1 UNTIL ENDNPU DO BEGIN NPU$DMPF[NPUORD] = FALSE; # * THE NPU STATE SHOULD BE SUPERVISED. IF SO AND THE DUMP * ON KEYWORD SPECIFIED, SET THE DUMP OPTION TO ASCII Y IN THE NPU * INITIALIZATION SM TO BE SENT. OTHERWISE, SET THE DUMP OPTION TO * ASCII N. IN EITHER CASE SEND THE NPU INITIALIZATION SM TO THE * OUTGOING TRAFFIC QUEUE. # IF NPU$STAT[NPUORD] EQ SUPSTAT"SUP" THEN BEGIN ABHDN[1] = NPU$NID[NPUORD]; ABHSN[1] = NPU$HID[NPUORD]; SSTAQE(P,WCBUF[1],ABH[1],CSSM[1]); # SEND SM # END # * CHECK IF NPU IS IN A NCF MISMATCHED STATE. IF SO, SET THE LOAD * REQUEST FLAG SINCE THIS MUST BE A LOAD COMMAND FROM THE HOP. A * SUBSEQUENT SUP/IN SM FROM THE NPU WILL CAUSE THE NEW LOAD REQUEST * FLAG TO BE SENT TO THE NPU IN THE SUP/IN/A SM. * SET THE DUMP FLAG ALSO IF SO INDICATED FROM THE DUMP ON KEYWORD * IN THE COMMAND. # ELSE IF (NPU$STAT[NPUORD] EQ SUPSTAT"NCFMIS" OR NPU$STAT[NPUORD] EQ SUPSTAT"LEVMIS") AND HDR$VERB[0] EQ "LO0" THEN BEGIN NPU$LRF[NPUORD] = TRUE; IF ONF THEN NPU$DMPF[NPUORD] = TRUE; END END # * PREPARE THE COMMAND TEXT PRECEEDED BY THE OPERATOR TERMINAL * NAME FOR THE LOG FILE. THE LOG FILE ENTRY IS SENT AS A * SUPERVISION EVENT TO THE EVENT PROCESSOR. # WCB$WORD[1] = 0; ABHWORD[1] = 0; WCB$SMID[1] = SMID"CMDTXT"; WCB$WC[1] = HDR$TXWCNT[0] + 4; ABHTLC[1] = (HDR$TXWCNT[0] + 2) * 10; CMD$TNAM[0] = OC$TNAM[HDR$OPORD[0]]; MOVCNT = HDR$TXWCNT[0]; P = LOC(CMD$TEXT[0]); # SET UP FOR MOVE # MOVE(MOVCNT,PARMS[0],MSCMD[0]); #MOVE TEXT INTO BUFFER# SSTAQE(P,WCBUF[1],ABH[1],CMDLINE[0]); # * NOW SEND THE NULL TERMINAL TEXT ENTRY TO THE OPERATOR WHICH WILL * CAUSE THE READY.. MESSAGE TO BE SENT TO THE OPERATOR. # WCB$WORD[1] = 0; ABHWORD[1] = 0; WCB$SMID[1] = SMID"TTEXT"; WCB$WC[1] = 2; WCB$IAF[1] = TRUE; # SET INPUT ALLOWED # ABHADR[1] = HDR$OPORD[0]; ABHTLC[1] = 0; # ZERO LENGTH TTEXT # SSTAQE(P,WCBUF[1],ABH[1],CSSM[1]); END # CSSADL # TERM