TITLE 'ICATS STATUS COMMAND ROUTINE' STA00010 *********************************************************************** STA00020 * * STA00030 * MODULE NAME = STATUS * STA00040 * * STA00050 * FUNCTION = RETURNS TO THE REQUESTER, THE STATUS OF THE ICATS * STA00060 * VIRTUAL MACHINE. SHOWS ACTIVE TERMINALS, AND * STA00070 * THE LAST TIME AN INTERRUPT CAME FROM ANY UTS. * STA00080 * THIS IS HANDY SO THAT YOU CAN SEE IF ANYTHING IS * STA00090 * GOING ON IN THE ICATS VIRTUAL MACHINE BEFORE YOU * STA00100 * SHUT IT DOWN. * STA00110 * * STA00120 * ENTRY POINTS = STATUS * STA00130 * * STA00140 * LINKAGE = BALR R14,R15 FROM ICATS MAINLINE. * STA00150 * * STA00160 * REGISTER CONTENTS UPON ENTRY = * STA00170 * R2 = POINTS TO THE ICATS COMMON DATA AREA, AS ALWAYS. * STA00180 * R14 = RETURN ADDRESS BACK TO ICATS MAINLINE * STA00190 * R15 = ENTRY POINT TO THIS MODULE * STA00200 * * STA00210 * REGISTER USAGE = * STA00220 * R0-R1 = USED TO PASS PARAMETERS TO SUBROUTINES. * STA00230 * R2 = USED TO ADDRESS THE ICATS COMMON DATA AREA. * STA00240 * R3 = USED TO HOLD THE ADDRESS OF THE EDITED LINE TO OUTPUT. * STA00250 * R4-R10 = FREE * STA00260 * R11 = MY BASE REGISTER * STA00270 * R14 = MY RETURN ADDRESS WHEN I CALL SOMEBODY * STA00280 * R15 = SUBROUTINE ADDRESS * STA00290 * * STA00300 * * STA00310 * MODULE LOGIC: * STA00320 * I) SEE WHERE THIS COMMAND CAME FROM. REJECT THIS * STA00330 * COMMAND IF IT CAME FROM A UTS. * STA00340 * II) ELSE GO AHEAD AND PROCESS THE COMMAND. * STA00350 * A) SHOW ANY ACTIVE TERMINALS. * STA00360 * B) TELL HIM THE LAST TIME SOMETHING HAPPENED. * STA00370 * * STA00380 * * STA00390 * NORMAL EXIT = * STA00400 * R15 = 0 * STA00410 * * STA00420 * EXTERNAL REFERENCES = NONE * STA00430 * * STA00440 * MACROS = ICDATA = ICATS COMMON DATA AREA * STA00450 * ETTE = ENTER TRACE TABLE ENTRY SUBROUTINE * STA00460 * * STA00470 * CHANGE ACTIVITY * STA00480 * DATE NAME REASON FOR CHANGE * STA00490 * 08/22/83 RICK JASPER INITIAL PROGRAM CREATION * STA00500 * * STA00510 *********************************************************************** STA00520 * STA00530 PRINT GEN,NODATA STA00540 STATUS CSECT STA00550 USING ICDATA,R2 USE R2 TO ADDRESS ICATS COMMON DATA AREA STA00560 USING CBTERM,R3 USE R3 TO ADDRESS TERMINAL CONTROL BLOCK STA00570 USING CBUTS,R4 USE R4 TO ADDRESS UTS CONTROL BLOCK STA00580 USING *,R15 USE R15 FOR NEXT INSTRUCTION ONLY STA00590 STM R0,R14,STATREGS SAVE ALL THE REGISTERS STA00600 DROP R15 STA00610 USING STATUS,R11 SWITCH BASE REGISTER TO R11 STA00620 LR R11,R15 STA00630 TM FLAGB,UTSCMD DID THIS COMMAND COME FROM A UTS ?? STA00640 BNO STATCONA REJECT IT IF SO. STA00650 L R15,AREJECT GO TO REJECT-THIS-COMMAND ROUTINE STA00660 BALR R14,R15 STA00670 B STATBYE STA00680 STATCONA EQU * STA00690 L R3,TERM1ST STA00700 LOOPA LTR R3,R3 ARE PAST THE END OF THE CHAIN ?? STA00710 BZ STATCONE IF SO, WE'RE DONE CHECKING. STA00720 TM CBTERMFA,PLUGGED IS THIS GUY PLUGGED IN ?? STA00730 BNO STATCONB NOPE, BRANCH STA00740 MVC PLUGDSTA,=C'IS PLUGGED IN' STA00750 B STATCONC GO T STA00760 STATCONB EQU * STA00770 TM CBTERMFA,MENUUP STA00780 BNO STATCOND STA00790 MVC PLUGDSTA,=C'HAS A MENU UP' STA00800 STATCONC EQU * STA00810 MVC PLUGD@,CBTERMEA STA00820 MVC PLUGDDAT,CBTERMDA STA00830 MVC PLUGDTIM,CBTERMTI STA00840 LA R1,PLUGDMSG SAY "XXX IS PLUGGED IN" OR "HAS A MENU UP" STA00850 L R15,AMESSAGE "LAST INTERRUPT WAS ON DATE AT TIME" STA00860 BALR R14,R15 STA00870 STATCOND EQU * STA00880 L R3,CBTERMFP STA00890 B LOOPA STA00900 STATCONE EQU * STA00910 *********************************************************************** STA00920 * NOW, CHECK EACH UTS AND REPORT THE DATE AND TIME OF THE LAST * STA00930 * INTERRUPT THAT CAME FROM THAT UTS. * STA00940 *********************************************************************** STA00950 * STA00960 L R4,CBFIRST STA00970 LOOPB DS 0H STA00980 LTR R4,R4 STA00990 BZ STATBYE STA01000 TM CBUTSFGA,ONLINE STA01010 BO STATCONF STA01020 MVC UTS2ID,CBUTSUID STA01030 LA R1,UTSMSG2 SAY "UTSX IS OFFLINE" STA01040 L R15,AMESSAGE STA01050 BALR R14,R15 STA01060 B STATCONG STA01070 STATCONF EQU * THIS UTS IS ONLINE STA01080 MVC UTS1ID,CBUTSUID STA01090 MVC UTSDATE,CBUTSDAT STA01100 MVC UTSTIME,CBUTSTIM STA01110 LA R1,UTSMSG1 SAY "UTSX IS OFFLINE" STA01120 L R15,AMESSAGE STA01130 BALR R14,R15 STA01140 STATCONG EQU * STA01150 L R4,CBUTSFP STA01160 B LOOPB STA01170 * STA01180 STATBYE DS 0H STA01190 LM R0,R14,STATREGS STA01200 SR R15,R15 STA01210 BR R14 STA01220 * STA01230 STATREGS DS 15F STA01240 * STA01250 PLUGDMSG DC AL1(PLUGDE) STA01260 PLUGD@ DS CL3 STA01270 DC C' ' STA01280 PLUGDSTA DS CL13 STA01290 DC C' - LAST INTERRUPT WAS ON ' STA01300 PLUGDDAT DS CL8 STA01310 DC C' AT ' STA01320 PLUGDTIM DS CL8 STA01330 PLUGDE EQU *-PLUGDMSG-1 STA01340 * STA01350 UTSMSG1 DC AL1(UTSMSG1E) STA01360 DC C'THE LAST INTERRUPT FROM ' STA01370 UTS1ID DS CL8 STA01380 DC C' WAS ON ' STA01390 UTSDATE DS CL8 STA01400 DC C' AT ' STA01410 UTSTIME DS CL8 STA01420 UTSMSG1E EQU *-UTSMSG1-1 STA01430 * STA01440 UTSMSG2 DC AL1(UTSMSG2E) STA01450 UTS2ID DS CL8 STA01460 DC C' IS OFFLINE' STA01470 UTSMSG2E EQU *-UTSMSG2-1 STA01480 LTORG STA01490 ICDATA STA01500 END STA01510