*DECK NS$NSS
USETEXT NAT$NS
USETEXT ERR$NS
PROC NS$NSS((STATE),(STIMULUS),ERRCODE); # NPU STATE TABLE PROCESSOR #
# TITLE NS$NSS - NPU STATE TABLE PROCESSOR. #
BEGIN # NS$NSS #
#
** NS$NSS - NPU STATE TABLE PROCESSOR.
*
* J.C. LEE 1981
*
* THIS ROUTINE IS THE NPU STATE TABLE PROCESSOR.
*
* PROC NS$NSS((STATE),(STIMULUS),ERRCODE)
*
* ENTRY:
* STATE-ORDINAL.
* STIMULUS-CODE.
* NPU-TABLE-ORDINAL.
*
* EXIT:
* ERRCODE.
*
* METHOD:
* USE STATUS SWITCHES TO ROUTINE CONTROL TO APPROPRIATE
* ROUTINE FOR THE SPECIFIED STATE-ORDINAL/STIMULUS-CODE
* COMBINATION.
*
#
ITEM STATE S:NPUSTATE; # NPU CURRENT STATE #
ITEM STIMULUS S:NWSTIM; # STATE TABLE STIMULUS #
ITEM ERRCODE U; # ERROR CODE #
$BEGIN
XREF
BEGIN
PROC NS$DBG; # TRACE PROCEDURE CALL #
END
$END
XREF
BEGIN
PROC NDLOVLD; # OVERLAY LOADER #
FUNC NS$FEC U; # FORMAT ERROR CODE #
PROC NS$N05;
PROC NS$N06;
PROC NS$N08;
PROC NS$N09;
PROC NS$N13;
END
ARRAY DAR$OVLY [0:0] S(1);
BEGIN # NPU/DT ABNORMAL RESPONSE PROCESSOR #
ITEM DAR$NAM C(00,00,07) = ["DAROVLY"];
ITEM DAR$LV1 U(00,42,09) = [4];
ITEM DAR$LV2 U(00,51,09) = [0];
END
ARRAY N00$OVLY [0:0] S(1);
BEGIN # LOAD REQUEST PROCESSOR #
ITEM N00$NAM C(00,00,07) = ["N00OVLY"];
ITEM N00$LV1 U(00,42,09) = [6];
ITEM N00$LV2 U(00,51,09) = [0];
END
ARRAY N04$OVLY [0:0] S(1);
BEGIN # NDCB RESPONSE PROCESSOR #
ITEM N04$NAM C(00,00,07) = ["N04OVLY"];
ITEM N04$LV1 U(00,42,09) = [7];
ITEM N04$LV2 U(00,51,09) = [0];
END
SWITCH STIMCASE:NWSTIM # CASES FOR STATE TABLE STIMULI #
STIM0:RQ$SAMLOAD,
STIM1:RQ$NPULOAD,
STIM5:NR$NPUDTD,
STIM6:AR$NPUDTD,
STIM7:NR$NPUDTL,
STIM8:AR$NPUDTL,
STIM9:NR$NPUDTS,
STIM10:AR$NPUDTS;
SWITCH STIM0CASE:NPUSTATE # NPU/IN/C (SAM) CASES #
NSS00:IDLE,
NSS15:DUMPNDCB,
NSS15:LOADSUD,
NSS15:STARTSUD,
NSS15:DUMPSUD,
NSS15:LOADNPU,
NSS15:STARTNPU,
NSS15:LOADNDCB,
NSS15:DUMPNPU,
NSS15:LOADDBS,
NSS15:STARTDBS,
NSS15:LOADSAM,
NSS15:STARTSAM;
SWITCH STIM1CASE:NPUSTATE # NPU/IN/R (NPU) CASES #
NSS00:IDLE,
NSS15:DUMPNDCB,
NSS15:LOADSUD,
NSS15:STARTSUD,
NSS15:DUMPSUD,
NSS15:LOADNPU,
NSS15:STARTNPU,
NSS15:LOADNDCB,
NSS15:DUMPNPU,
NSS15:LOADDBS,
NSS15:STARTDBS,
NSS16:LOADSAM,
NSS16:STARTSAM;
SWITCH STIM5CASE:NPUSTATE # NPU/DT/N (DUMP) CASES #
NSS16:IDLE,
NSS04:DUMPNDCB,
NSS16:LOADSUD,
NSS16:STARTSUD,
NSS05:DUMPSUD,
NSS16:LOADNPU,
NSS16:STARTNPU,
NSS16:LOADNDCB,
NSS06:DUMPNPU,
NSS16:LOADDBS,
NSS16:STARTDBS,
NSS16:LOADSAM,
NSS16:STARTSAM;
SWITCH STIM6CASE:NPUSTATE # NPU/DT/A (DUMP) CASES #
NSS16:IDLE,
NSS07:DUMPNDCB,
NSS16:LOADSUD,
NSS16:STARTSUD,
NSS07:DUMPSUD,
NSS16:LOADNPU,
NSS16:STARTNPU,
NSS16:LOADNDCB,
NSS07:DUMPNPU,
NSS16:LOADDBS,
NSS16:STARTDBS,
NSS16:LOADSAM,
NSS16:STARTSAM;
SWITCH STIM7CASE:NPUSTATE # NPU/DT/N (LOAD) CASES #
NSS16:IDLE,
NSS16:DUMPNDCB,
NSS08:LOADSUD,
NSS16:STARTSUD,
NSS16:DUMPSUD,
NSS08:LOADNPU,
NSS16:STARTNPU,
NSS09:LOADNDCB,
NSS16:DUMPNPU,
NSS08:LOADDBS,
NSS16:STARTDBS,
NSS08:LOADSAM,
NSS16:STARTSAM;
SWITCH STIM8CASE:NPUSTATE # NPU/DT/A (LOAD) CASES #
NSS16:IDLE,
NSS16:DUMPNDCB,
NSS10:LOADSUD,
NSS16:STARTSUD,
NSS16:DUMPSUD,
NSS11:LOADNPU,
NSS16:STARTNPU,
NSS12:LOADNDCB,
NSS16:DUMPNPU,
NSS11:LOADDBS,
NSS16:STARTDBS,
NSS11:LOADSAM,
NSS16:STARTSAM;
SWITCH STIM9CASE:NPUSTATE # NPU/DT/N (START) CASES #
NSS16:IDLE,
NSS16:DUMPNDCB,
NSS16:LOADSUD,
NSS13:STARTSUD,
NSS16:DUMPSUD,
NSS16:LOADNPU,
NSS13:STARTNPU,
NSS16:LOADNDCB,
NSS16:DUMPNPU,
NSS16:LOADDBS,
NSS13:STARTDBS,
NSS16:LOADSAM,
NSS13:STARTSAM;
SWITCH STIM10CASE:NPUSTATE # NPU/DT/A (START) CASES #
NSS16:IDLE,
NSS16:DUMPNDCB,
NSS16:LOADSUD,
NSS10:STARTSUD,
NSS16:DUMPSUD,
NSS16:LOADNPU,
NSS14:STARTNPU,
NSS16:LOADNDCB,
NSS16:DUMPNPU,
NSS16:LOADDBS,
NSS14:STARTDBS,
NSS16:LOADSAM,
NSS14:STARTSAM;
CONTROL EJECT;
$BEGIN
NS$DBG("NSS"); # TRACE CALL #
$END
ERRCODE = 0;
GOTO STIMCASE[STIMULUS]; # CASE ON STATE TABLE STIMULUS #
STIM0: # NPU/IN/C (SAM) #
GOTO STIM0CASE[STATE]; # CASE ON NPU STATE #
STIM1: # NPU/IN/R (NPU) #
GOTO STIM1CASE[STATE]; # CASE ON NPU STATE #
STIM5: # NPU/DT/N (DUMP) #
GOTO STIM5CASE[STATE]; # CASE ON NPU STATE #
STIM6: # NPU/DT/A (DUMP) #
GOTO STIM6CASE[STATE]; # CASE ON NPU STATE #
STIM7: # NPU/DT/N (LOAD) #
GOTO STIM7CASE[STATE]; # CASE ON NPU STATE #
STIM8: # NPU/DT/A (LOAD) #
GOTO STIM8CASE[STATE]; # CASE ON NPU STATE #
STIM9: # NPU/DT/N (START) #
GOTO STIM9CASE[STATE]; # CASE ON NPU STATE #
STIM10: # NPU/DT/A (START) #
GOTO STIM10CASE[STATE]; # CASE ON NPU STATE #
CONTROL EJECT;
NSS00: # PROCESS LOAD REQUEST #
NDLOVLD(N00$OVLY,ERRCODE);
GOTO NSSEXIT;
NSS04: # PROCESS NPU/DT/N (DUMP NDCB) #
NDLOVLD(N04$OVLY,ERRCODE);
GOTO NSSEXIT;
NSS05: # PROCESS NPU/DT/N (DUMP SUD) #
NS$N05(ERRCODE);
GOTO NSSEXIT;
NSS06: # PROCESS NPU/DT/N (DUMP) #
NS$N06(ERRCODE);
GOTO NSSEXIT;
NSS08: # PROCESS NPU/DT/N (LOAD) #
NS$N08(ERRCODE);
GOTO NSSEXIT;
NSS09: # PROCESS NPU/DT/N (LOAD NDCB) #
NS$N09(ERRCODE);
GOTO NSSEXIT;
NSS13: # PROCESS NPU/DT/N (START) #
NS$N13(ERRCODE);
GOTO NSSEXIT;
NSS07: # PROCESS NPU/DT/A(DUMP) #
NSS10: # PROCESS NPU/DT/A(LOAD SUD) #
NSS11: # PROCESS NPU/DT/A(LOAD) #
NSS12: # PROCESS NPU/DT/A(LOAD NDCB) #
NSS14: # PROCESS NPU/DT/A(START) #
NDLOVLD(DAR$OVLY,ERRCODE); # CALL ABNORMAL RESPONSE PROCESSOR #
GOTO NSSEXIT;
NSS15: # PREEMPT CURRENT ACTIVITY #
ERRCODE = NS$FEC(EC"ERR$PREEM",0);
GOTO NSSEXIT;
NSS16: # SM PROTOCAL ERROR, DISCARD SM #
ERRCODE = NS$FEC(EC"ERR$NP",0);
GOTO NSSEXIT;
NSSEXIT:
RETURN;
END # NS$NSS #
TERM