PROC K;
# TITLE K - *K* DISPLAY DOCUMENTATION. #
BEGIN # K #
#
***** *K* DISPLAY ROUTINES.
*
* THE *K* DISPLAY ROUTINES ARE TO PROVIDE ACCESS TO THE
* *K* DISPLAY FOR THE SSEXEC. THE FUNCTIONS ARE TO
* FORMAT THE LEFT SCREEN DISPLAY AND TO PROCESS THE KEYBOARD
* RESPONSES FROM THE OPERATOR.
*** OVERVIEW OF *K* DISPLAY ROUTINES.
*
* THE *K* DISPLAY ROUTINES ARE -
*
* KCLR - CLEAR CURRENT ENTRY ON *K* DISPLAY.
* KDISPLY - *K* DISPLAY OVERLAY PROCESSOR.
* KDSM - DISPLAY SM INFORMATION.
* KFILES - PROCESS *FILES* COMMAND.
* KINIT - *K* DISPLAY INITIALIZATION.
* KINPUT - KEYBOARD INPUT PROCESSOR.
* KPFILL - PARAMETER FILL ROUTINE.
* KPROC - *K* DISPLAY PROCESSOR.
* KREQ - *K* DISPLAY REQUEST.
* KSM - PROCESS *SMI* COMMAND.
*
* *KINIT* MUST BE CALLED ONCE INITIALLY TO ISSUE THE
* *CONSOLE* MACRO.
*
* *KREQ* PROCESSES REQUESTS TO PLACE A GROUP OF MESSAGES
* ON THE LEFT SCREEN OR TO COMPLETE/CLEAR A GROUP OF MESSAGES
* FROM THE LEFT SCREEN.
*
* THE CALLER CAN SPECIFY UP TO THREE MESSAGES IN EACH REQUEST,
* INDICATE WHAT OPERATOR RESPONSES ARE VALID, REQUEST THAT THE
* MESSAGE(S) BE ISSUED TO THE DAYFILE/ERROR LOG, AND INCLUDE
* PARAMETER VALUES TO BE INSERTED INTO THE MESSAGE TEXTS.
*
* NEW REQUESTS ARE PLACED IN A QUEUE FOR LATER PROCESSING.
* THEY REMAIN IN THE QUEUE UNTIL THEY ARE COMPLETED BY
* SOME EVENT. THE EVENTS ARE -
* . CALL TO *KREQ* TO CLEAR THE MESSAGES (DELINK).
* . OPERATOR RESPONSE.
* . "IMMEDIATE-COMPLETE" OPTION SET IN THE REQUEST.
*
* THE QUEUE IS FORMED BY LINKING THRU A FIELD IN THE
* REQUEST. THEREFORE, THE REQUEST WORDS MUST REMAIN
* AVAILABLE WHILE THE REQUEST IS NOT COMPLETE.
*
* THE "IMMEDIATE-COMPLETE" OPTION IN THE REQUEST WORDS MEANS
* THE *K* PROCESSING WILL SET THE COMPLETE BIT AND DELINK THE
* REQUEST FROM THE QUEUE AS SOON AS IT HAS PLACED THE MESSAGES
* ON THE LEFT SCREEN. THEN THE ONLY WAY TO CLEAR THOSE
* MESSAGES ON THE SCREEN IS BY AN OPERATOR RESPONSE.
*
* TO REQUEST MESSAGES TO BE PLACED ON THE LEFT SCREEN,
* THE CALLER MUST FORMAT THE REQUEST BY USING THE
* *KWORD* BASED ARRAY IN *COMBKDD* AND THEN CALL
* *KREQ* SPECIFYING THE PROPER PARAMETERS..
* - ADDRESS OF THE *KWORD* ARRAY, AND
* - *KLINK*, WHICH ADDS A NEW REQUEST.
* THE CALLER MUST SPECIFY IN THE *KWORD* ARRAY
* THE CALLER CONTROLLED FLAGS AND THE MESSAGE
* ORDINALS FOR LINES 1, 2, 3. ALSO, THE
* PARAMETER WORD IN *KWORD* MUST BE SET
* IF PARAMETERS ARE USED IN THE MESSAGE TEXT.
*
* THE MESSAGE ORDINALS ARE DEFINED IN THE *KM*
* STATUS LIST IN *COMBKDD* (MESSAGE ORDINAL ZERO
* SPECIFIES A BLANK LINE). THE MESSAGE TEXTS
* AND PARAMETER DEFINITIONS ARE ALSO DEFINED
* IN *COMBKDD*.
*
* TO CLEAR A REQUEST THAT IS QUEUED WAITING
* TO BE DISPLAYED OR IS ALREADY ON THE LEFT SCREEN
* DISPLAY, THE PROC *KREQ* CAN BE CALLED
* SPECIFYING THE ADDRESS OF THE *KWORD* ARRAY
* AND THE VALUE *KDELINK*.
*
* *KPROC* CONTROLS THE PROCESSING OF THE LEFT SCREEN AND
* OPERATOR RESPONSES. IT SHOULD BE CALLED PERIODICALLY.
* WHEN IT DETECTS WORK TO BE DONE, IT CALLS THE
* OVERLAY *KDISPLY* TO PROCESS THE WORK.
*** THE LEFT SCREEN FORMAT IS -
*
* LINE -
* TYPE - DESCRIPTION
* ---- - -----------
*
*
* - --------------------------
* TITLE - - MASS STORAGE SUBSYSTEM -
* - --------------------------
* -
* -
* BODY - 1. LINE 1 OF THE *K* REQUEST 1.
* - LINE 2 OF THE *K* REQUEST 1.
* - LINE 3 OF THE *K* REQUEST 1.
* -
* -
* - 2. LINE 1 OF THE *K* REQUEST 2. ...
* - LINE 2 OF ...
* - LINE 3 OF THE *K* REQUEST 2. ...
* -
* -
* - (UP TO 2 ORDINALS)
*
* REJECT - *** REJECT ***
* -
* -
* ECHO - (KEYBOARD TYPE-IN)
* -
*
* THE BODY CONSISTS OF AN ORDINAL REPRESENTING A SPECIFIC *K*
* REQUEST AND THE TEXT AS SPECIFIED IN THAT REQUEST.
* A MAXIMUM OF 3 LINES MAY BE SPECIFIED PER REQUEST.
*** OPERATOR RESPONSES.
*
* RESPONSES TO MESSAGES IN THE LEFT SCREEN BODY HAVE THE FORM -
*
* N.COMMAND. WHERE N IS THE ORDINAL
* AND COMMAND = *GO* OR *DROP*.
*
* OTHER OPERATOR COMMANDS DEFINED ARE -
*
* FILES,N. WHERE N IS THE AUTHORIZED DATA BUFFER COUNT.
*
* SMI. WHERE I IS THE SM ORDINAL FOR WHICH
* INFORMATION IS DISPLAYED.
*
* SMI,DRD=ST=N. WHERE I IS THE SM ORDINAL
* SMI,DRD=DS=N. AND N IS THE MAXIMUM NUMBER OF DRD-S
* PERMITTED FOR STAGING OR DESTAGING FILES.
* (ST IF STAGING, DS IF DESTAGING)
*
* STAGE. TOGGLE OPEN/CLOSE STATUS.
* DESTAGE.
*
#
END # K #
TERM
PROC KCLR((ORD));
# TITLE KCLR - CLEAR CURRENT ENTRY ON *K* DISPLAY. #
BEGIN # KCLR #
#
** KCLR - CLEAR CURRENT ENTRY ON *K* DISPLAY.
*
* *KCLR* CLEARS THE LEFT SCREEN AREA FOR THE SPECIFIED
* ORDINAL, DECREMENTS THE *KACTCOUNT* AND CLEARS THE
* *KCURRENT* ENTRY FOR THE ORDINAL.
*
* PROC KCLR((ORD))
*
* ENTRY (ORD) - ORDINAL OF CURRENT ENTRY TO CLEAR.
*
* EXIT (KACTCOUNT) - DECREMENTED.
* (KCUR$WD) - ENTRY FOR SPECIFIED ORDINAL IS CLEARED.
*
* LINES IN THE BODY OF LEFT SCREEN FOR THE SPECIFIED
* ORDINAL ARE CLEARED.
*
#
ITEM ORD I; # ORDINAL OF CURRENT ENTRY #
DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
*CALL,COMBFAS
*CALL COMBKDA
ITEM LINES I; # TEMPORARY CELL #
CONTROL EJECT;
P<KLBODY> = LOC(KL$LINE[LF$BODY]);
#
* CLEAR LEFT SCREEN LINES FOR THE GIVEN ORDINAL, ONLY IF
* THE MESSAGE DISPLAY IS ON THE SCREEN.
#
IF NOT KSMDISP
THEN # REMOVE MESSAGES #
BEGIN # MSG #
FASTFOR LINES = 1 STEP 1 UNTIL 3
DO # CLEAR EACH LINE #
BEGIN # BLANK #
KLB$LINCLR[LINES,ORD] = " ";
END # BLANK #
END # MSG #
KCUR$WD[ORD] = 0; # CLEAR *KCURRENT* ENTRY #
KACTCOUNT = KACTCOUNT - 1; # DECREMENT ACTIVE COUNT #
RETURN;
END # KCLR #
TERM
PROC KDISPLY;
# TITLE KDISPLY - *K* DISPLAY OVERLAY. #
BEGIN # KDISPLY #
#
** KDISPLY - *K* DISPLAY OVERLAY.
*
* *KDISPLY* CALLS *KINPUT* IF THERE IS AN OPERATOR TYPE-IN
* IN THE *KBINPUT* BUFFER, BUILDS THE LEFT SCREEN BUFFER
* FOR NEW REQUESTS AND CONTAINS THE ARRAY OF DEFINED *K*
* MESSAGES.
*
* PROC KDISPLY.
*
* ENTRY (KACTCOUNT) - NUMBER OF ACTIVE REQUESTS IN BODY
* OF THE LEFT SCREEN.
* (KLINKQ) - HEAD OF K-QUEUE.
* = 0 IF EMPTY.
* ARRAY KBINPUT - KEYBOARD INPUT BUFFER.
* ARRAY KCURRENT - CURRENT ENTRIES ON LEFT SCREEN.
* = 0 IF ENTRY AVAILABLE.
*
* EXIT FOR EACH NEW *KWORD* REQUEST THAT IS PROCESSED -
* - LINES ARE FORMATTED FOR THE LEFT SCREEN BODY.
* - LINES ARE ISSUED TO THE DAYFILE IF SPECIFIED.
* - LINES ARE ISSUED TO THE ERROR LOG IF SPECIFIED.
* - IF THE *KW$IC* IS SET, THE COMPLETE BIT IS SET AND
* THE *KWORD* REQUEST IS DELINKED FROM THE K-QUEUE.
* (KW$ACT) - SET IN *KWORD* REQUEST.
* (KACTCOUNT) - INCREMENTED FOR REQUESTS PROCESSED.
* ARRAY KCURRENT - ENTRIES SET FOR REQUESTS PROCESSED.
* KNEWREQ - SET FALSE WHEN NO NEW REQUESTS
* ARE FOUND.
*
* NOTES THE DEFINED MESSAGE SIZE IS 40 CHARACTERS.
*
#
#
**** PROC KDISPLY - XREF LIST BEGIN.
#
XREF
BEGIN
PROC KDSM; # DISPLAY *SM* INFORMATION #
PROC KINPUT; # KEYBOARD INPUT #
PROC KPFILL; # *K* PARAMETER FILL #
PROC KREQ; # *K* DISPLAY REQUEST #
PROC MESSAGE; # ISSUE *MESSAGE* MACRO #
FUNC XCOD C(10); # CONVERT INTEGER TO OCTAL DISPLAY
CODE #
END
#
**** PROC KDISPLY - XREF LIST END.
#
DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
*CALL COMBFAS
*CALL COMBKDA
*CALL COMBKDD
ITEM CURRKW I; # *KWORD* ADDRESS #
ITEM CURRORD I; # ORDINAL #
ITEM I I; # TEMPORARY CELL #
ITEM LINE I; # LINE NUMBER #
ITEM MSGORD I; # MESSAGE ORDINAL #
ITEM TEMP C(10); # TEMPORARY CELL #
ITEM DSPLORD C(10) = " N. "; # DISPLAY ORDINAL #
#
* ARRAY OF MESSAGES DEFINED FOR THE *K* DISPLAY.
#
ARRAY KMESSAGES [0:KMNUM] S(4);
BEGIN
ITEM KM$TEXT C(00,00,40) = [ "NO-ONE",
KM1,
KM2,
KM3,
KM4,
KM5,
KM6,
KM7,
KM8,
KM9,
KM10,
KM11,
KM12,
KM13,
KM14,
KM15,
KM16,
KM17,
KM18,
KM19,
KM20,
KM21,
KM22,
KM23,
KM24,
KM25,
KM26,
KM27,
KM28,
KM29,
KM30 ];
END
#
* ARRAY TO DEVELOP THE MESSAGE TEXT FOR THE *K* LINE.
#
ARRAY TEXT [0:0] S(7);
BEGIN
ITEM TEXT$WDS C(00,00,60);
ITEM TEXT$ALL C(00,00,40);
ITEM TEXT$ZER U(06,00,60) = [0];
END
#
* ARRAY TO SET UP MESSAGES FOR DAYFILES.
#
ARRAY DAYTEXT [0:0] S(5);
BEGIN
ITEM DAYT$ALL C(00,00,40);
ITEM DAYT$ZER C(04,00,60) = [0];
END
CONTROL EJECT;
#
* CALL *KINPUT* IF THERE IS A RESPONSE IN THE KEYBOARD BUFFER.
#
IF KB$CLEAR[0] NQ 0
THEN
BEGIN
KINPUT;
END
#
* REFRESH *SM* DISPLAY.
#
IF KSMDISP # SM DISPLAY IN BUFFER #
AND KLINKQ EQ 0 # NO MESSAGES TO DISPLAY #
THEN # *SM* DISPLAY CAN BE REFRESHED #
BEGIN # SM #
IF KL$COMP[0]
THEN # SM DISPLAY ON SCREEN #
BEGIN # UPDATE #
KDSM; # REFRESH SM DISPLAY #
END # UPDATE #
RETURN; # DO NOT DISPLAY MESSAGES #
END # SM #
#
* PROCESS ALL POSSIBLE MESSAGES FOR THE LEFT SCREEN.
#
IF KSMDISP
THEN # SM DISPLAY IN BUFFER #
BEGIN # CLEAR #
SLOWFOR I = (LF$TITLEDIS+1) STEP 1 UNTIL (LF$VALCMD-1)
DO # CLEAR BUFFER FOR MESSAGES #
BEGIN # BLANK #
KL$LINE[I] = " ";
END # BLANK #
KSMDISP = FALSE; # NOTE SM DISPLAY NO LONGER UP #
END # CLEAR #
REPEAT
DO
BEGIN # PROCESS LEFT SCREEN DISPLAYS #
#
* RETURN IF THERE IS NO AVAILABLE SPACE ON THE LEFT SCREEN.
#
IF KACTCOUNT EQ KORD
THEN
BEGIN
RETURN;
END
#
* SEARCH THE K-QUEUE TO FIND A NEW REQUEST.
* SETS - *CURRKW* = *KWORD* ADDRESS OR ZERO (IF END OF THE QUEUE).
#
CURRKW = KLINKQ;
P<KWORD> = CURRKW;
REPEAT WHILE CURRKW NQ 0 AND KW$ACT[0]
DO
BEGIN
CURRKW = KW$LINK[0];
P<KWORD> = CURRKW;
END
#
* RETURN IF THERE IS NO NEW REQUEST.
#
IF CURRKW EQ 0
THEN
BEGIN
KNEWREQ = FALSE;
RETURN; # NO NEW REQUEST #
END
#
* LOCATE THE ORDINAL FOR AVAILABLE SPACE ON THE LEFT SCREEN.
#
FASTFOR I = KORD STEP -1 UNTIL 1
DO
BEGIN
IF KCUR$WD[I] EQ 0
THEN
BEGIN
CURRORD = I;
END
END
#
* BUILD THE LINES FOR THE LEFT SCREEN BODY.
#
P<KLBODY> = LOC(KL$LINE[LF$BODY]);
TEMP = XCOD(CURRORD);
C<5,1>DSPLORD = C<9,1>TEMP;
KLB$ORD[1,CURRORD] = DSPLORD;
FOR LINE = 1 STEP 1 UNTIL 3
DO
BEGIN # BUILD DISPLAY LINE #
MSGORD = KW$MSGORD(LINE); # GET MESSAGE ORDINAL #
IF MSGORD EQ 0
THEN # NO MESSAGE FOR THIS LINE #
BEGIN
TEST LINE;
END
TEXT$WDS[0] = KM$TEXT[MSGORD]; # GET MESSAGE TEXT #
KPFILL(TEXT[0],LOC(KW$PAR[0])); # SET PARAMETERS #
KLB$TEXT[LINE,CURRORD] = TEXT$WDS[0]; # TEXT TO LEFT SCREEN
#
IF KW$DF[0]
THEN # TEXT TO DAYFILE #
BEGIN
DAYT$ALL[0] = TEXT$ALL[0]; # SEND FEWER CHARACTERS #
MESSAGE(DAYTEXT,UDFL1);
END
IF KW$ELOG[0]
THEN # TEXT TO ERROR LOG #
BEGIN
DAYT$ALL[0] = TEXT$ALL[0]; # SEND FEWER CHARACTERS #
MESSAGE(DAYTEXT,ERRLOG);
END
END # BUILD DISPLAY LINE #
#
* SET *KWORD* ACTIVE AND SET *KCURRENT* FOR THE ORDINAL.
#
KW$ACT[0] = TRUE; # ACTIVE FLAG #
KCUR$CW[CURRORD] = KW$CW[0]; # CONTROL FLAGS #
KCUR$ADDR[CURRORD] = CURRKW; # *KWORD* ADDRESS #
KACTCOUNT = KACTCOUNT + 1; # ACTIVE COUNTER #
#
* IF THE REQUEST SPECIFIED AN *IMMEDIATE-COMPLETE*, SET THE
* *KWORD* COMPLETE AND DELINK IT. THE CONTROL FLAGS
* REMAIN IN *KCURRENT* TO KEEP THAT ORDINAL MARKED ACTIVE,
* AND THE MESSAGES (LINE 1-3) REMAIN UP.
#
IF KW$IC[0]
THEN
BEGIN
KW$COMP[0] = TRUE; # COMPLETE #
KCUR$ADDR[CURRORD] = 0; # CLEAR *KWORD* ADDRESS #
KREQ(CURRKW,KDELINK); # DELINK FROM *K* QUEUE #
END
END # PROCESS LEFT SCREEN DISPLAYS #
END # KDISPLY #
TERM
PROC KDSM;
# TITLE KDSM - DISPLAY *SM* INFORMATION ON *K* DISPLAY. #
BEGIN # KDSM#
#
** KDSM - PAINT *SM* INFORMATION ON K-DISPLAY.
*
* *KDSM* DISPLAYS STORAGE MODULE INFORMATION FROM THE UDT ON THE
* K-DISPLAY IN RESPONSE TO AN *SMI* COMMAND INPUT FROM THE
* KEYBOARD.
*
* PROC KDSM
*
* ENTRY ARRAY KBINPUT (DEFINED IN *COMBKDD*) CONTAINS THE
* IMAGE OF THE *SMI* COMMAND.
*
* EXIT *SM* PORTION OF *K* DISPLAY HAS BEEN UPDATED.
*
* MESSAGES
*
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* 1 2 3 4 5 6 7
*1234567890123456789012345678901234567890123456789012345678901234567890
* - MSE SUBSYSTEM - 1
* - OPEN STAGE RTRQ= 0 OPEN DESTAGE- 2
* 3
* 4
* SMI STATUS ON 5
* X MAX DRDS FOR STAGING 6
* Y MAX DRDS FOR DESTAGING 7
* 8
* JSN FILE UI PRU-S 9
* DRD0 STAGE - WXYZ FILENAM USRIDX PRUCNT 10
* DRD1 DESTAGE - ABCD FILENAM USRIDX PRUCNT 11
* 12
* 13
* VALID COMMANDS 14
* K.X.GO. CLEARS ORDINAL *X* 15
* K.STAGE OR K.DESTAGE TOGGLES OPEN/CLOSE 16
* K.SMI SELECTS SM *I* INFORMATION 17
* K.SMI,DRD=ST=X SETS MAX *X* STAGE DRDS 18
* K.SMI,DRD=DS=Y SETS MAX *Y* DESTAGE DRDS 19
*
*
*
*
#
#
**** PROC KDSM - XREF LIST BEGIN.
#
XREF
BEGIN
PROC KPFILL; # *K* PARAMTER FILL #
PROC ZFILL; # ZERO-FILL PARAMETER BLOCK #
END
#
**** PROC KDSM - XREF LIST END.
#
DEF LISTCON #0#; # DO NOT LIST COMDECKS #
*CALL COMBFAS
*CALL COMBCPR
*CALL COMBFET
*CALL COMBHFC
*CALL COMBKDA
*CALL COMBKDD
*CALL COMBLRQ
*CALL COMBUCR
*CALL COMBTDM
*CALL COMBUDT
*CALL COMXCTF
*CALL COMXHLR
*CALL COMXIPR
*CALL COMXLTC
*CALL COMXMSC
ITEM INTSM I; # INTEGER SM ID #
#
* ARRAY TO HOLD MESSAGE TEXT FOR LEFT SCREEN LINE.
#
ARRAY TEXT [0:0] S(7); # HOLDS MESSAGE FOR LEFT SCREEN #
BEGIN
ITEM TEXT$WDS C(00,00,60);
ITEM TEXT$ZER C(06,00,60) = [0]; # ZERO-BYTE TERMINATOR #
END
#
* ARRAY TO BUFFER JSN HEADER TO STOP FLICKER.
#
ARRAY HEADERBUF [0:0] S(6); # HOLDS BLANKS OR HEADER #
BEGIN
ITEM HB$LINE C(00,00,52);
END
CONTROL EJECT;
ZFILL(KSMPARMS,SMPARMLEN); # CLEAR SM PARAMETER BLOCK #
KSMDISP = TRUE; # CONSIDER SM DISPLAY IN BUFFER #
#
* BUILD *KSM1* MESSAGE LINE (LINE 5 IN K-DISPLAY SHOWN ABOVE)
* TO REFLECT THE STATUS OF THE SM.
*
* THE SM MAY BE ON, OFF, OR IN MAINTENANCE MODE.
#
P<KWORD> = LOC(KSM$WORD[0]) - 1; # POINT TO PARAMETER BLOCK #
KP$SM = KSMID; # SET SM IDENTIFIER #
KP$NF = "OFF "; # DEFAULT SM STATUS #
KP$MA = " "; # IN CASE "E" FROM "MAINT" #
INTSM = KUDTIND; # SET UDT INDEX FOR PROCESSING #
IF SM$ON[INTSM] ##
AND NOT SM$ON$ACK[INTSM] # NOT CHANGING STATUS #
THEN # SM MAY BE ON #
BEGIN # CHECK #
IF NOT INITIALIZE
THEN # SM IS ON AND IDLE #
BEGIN # ON #
KP$NF = "ON ";
END # ON #
ELSE # SM MAY NOT YET BE ON #
BEGIN # INIT #
IF SM$CUO0[INTSM] NQ 0
THEN # FIRST CU CONNECTED TO SM #
BEGIN # 1ST #
P<UDT$MSG> = LOC(UD$MSG[SM$CUO0[INTSM]]);
IF MS$MSG[0] GQ HFC$CHSCIF ##
AND MS$MSG[0] LQ HFC$CHSDIO
THEN # SM TURNED ON IN INIT #
BEGIN # ON #
KP$NF = "ON ";
END # ON #
END # 1ST #
IF SM$CUO1[INTSM] NQ 0
THEN # SECOND CU CONNECTED TO SM #
BEGIN # 2ND #
P<UDT$MSG> = LOC(UD$MSG[SM$CUO1[INTSM]]);
IF MS$MSG[0] GQ HFC$CHSCIF ##
AND MS$MSG[0] LQ HFC$CHSDIO
THEN # SM TURNED ON IN INIT #
BEGIN # ON #
KP$NF = "ON ";
END # ON #
END # 2ND #
END # INIT #
END # CHECK #
IF SM$DIAG[INTSM] ##
AND NOT SM$DAG$ACK[INTSM] # NOT CHANGING STATUS #
THEN # SM IS IN MAINTENANCE MODE #
BEGIN # MAINT #
KP$NF = "MAINTENANC";
KP$MA = "E"; # REQUIRES 2 PARAMETERS #
END # MAINT #
TEXT$WDS[0] = KSM1;
KPFILL(TEXT[0], LOC(KSM$WORD[0]));
KL$LINE[LF$SMINFO] = TEXT$WDS[0]; # MSG --> DISPLAY BUFFER #
#
* BUILD *KSM2* AND *KSM3* MESSAGES (LINES 6 AND 7 IN K-DISPLAY)
#
KP$ND = SM$STNUM[INTSM];
TEXT$WDS[0] = KSM2;
KPFILL(TEXT[0], LOC(KSM$WORD[0]));
KL$LINE[LF$SMINFO+1] = TEXT$WDS[0]; # MSG --> DISPLAY BUFFER#
KP$ND = SM$DSNUM[INTSM];
TEXT$WDS[0] = KSM3;
KPFILL(TEXT[0], LOC(KSM$WORD[0]));
KL$LINE[LF$SMINFO+2] = TEXT$WDS[0]; # MSG --> DISPLAY BUFFER#
KL$LINE[LF$SMINFO+3] = " "; # BLANK LINE --> BUFFER #
HB$LINE[0] = " "; # ASSUME NO STAGING OR DESTAGING #
#
* BUILD TEXT LINE TO REFLECT STATUS OF UPPER DRD.
*
* THE DRD MAY BE OFF, IDLE, ACTIVE WITH A STAGE OR DESTAGE,
* IN USE BY A UTILITY, OR IN MAINTENANCE MODE.
*
* IF ACTIVE, PROCESSING INFORMATION SUCH AS FILE NAME, PRU COUNT,
* USER INDEX, AND JOB NAME, IS RETRIEVED FROM THE HLRQ,
* TDAM ENTRY, AND DISK FET.
#
KP$DD = D0$SUN[INTSM]; # SET DRD NUMBER FOR NEXT MESSAGE #
IF D0$ON$ACK[INTSM] # DRD CHANGING STATUS #
OR D0$LLADR[INTSM] EQ 0 # DRD NOT YET ACCESSED #
OR NOT D0$ON[INTSM]
THEN # DRD IS OFF OR IN MAINT MODE #
BEGIN # NOT ON #
IF D0$DIAG[INTSM] ##
AND NOT D0$DAG$ACK[INTSM]
THEN # DRD IN MAINTENANCE MODE #
BEGIN # MAINT #
TEXT$WDS[0] = KSM10;
END # MAINT #
ELSE # DRD IS OFF #
BEGIN # OFF #
TEXT$WDS[0] = KSM8;
END # OFF #
END # NOT ON #
ELSE
BEGIN # DRD0 IS ON #
P<LLRQ> = D0$LLADR[INTSM];
IF LLR$PRCNME[0] EQ REQTYP4"INITHW" # DRD TURNING ON #
OR LLR$RQI[0] EQ REQNAME"RQIAUCP" # ABORTED UCP #
OR NOT D0$FULL[INTSM]
THEN # DRD NOT IN USE #
BEGIN # DRD0 IS IDLE #
TEXT$WDS[0] = KSM9;
END
ELSE
BEGIN # DRD0 IS ACTIVE - BUILD STATUS LINE #
IF LLR$RQI[0] NQ REQNAME"RQIINT" # NOT STAGE OR DESTAGE #
THEN
BEGIN # DRD0 PROCESSING UTILITY REQUEST #
TEXT$WDS[0] = KSM7;
END
ELSE # DRD0 PROCESSING STAGE/DESTAGE REQUEST #
BEGIN # GET HLRQ AND TDAM VALUES FOR K-DISPLAY#
HB$LINE[0] = KSM4; # MOVE HEADER TO BUFFER #
P<HLRQ> = LLR$UCPRA;
P<TDAM> = LOC(HLR$TDAM);
P<FETSET> = LLR$DSKFET[0];
KP$FN = TDAMPFN;
KP$UI = TDAMUI;
IF HLR$HPN EQ HLRPN"STAGE"
THEN
BEGIN # STAGE MESSAGE NEEDED #
TEXT$WDS[0] = KSM5;
KP$PU = FET$CRI[0] + HLR$PRU[0]; # STAGING DIFFERENT #
KP$JN = TDAMJSN;
END
ELSE
BEGIN # DESTAGE MESSAGE NEEDED #
TEXT$WDS[0] = KSM6;
KP$PU = FET$CRI[0];
KP$JN = LTC$SFJBSN[DSC$LTCT];
END
IF P<FETSET> EQ 0
THEN # GET SAVED PRU COUNT #
BEGIN # SAVED #
KP$PU = HLR$PRU[0];
END # SAVED #
END # GET HLRQ AND TDAM VALUES FOR K-DISPLAY #
END # DRD0 IS ACTIVE - BUILD STATUS LINE #
END # DRD0 IS ON #
KPFILL(TEXT[0],LOC(KSM$WORD[0]));
KL$LINE[LF$SMDRD0] = TEXT$WDS[0];
#
* BUILD TEXT LINE TO REFLECT STATUS OF LOWER DRD.
*
#
KP$DD = D1$SUN[INTSM]; # SET DRD NUMBER FOR NEXT MESSAGE #
IF D1$ON$ACK[INTSM] # DRD CHANGING STATUS #
OR D1$LLADR[INTSM] EQ 0 # DRD NOT YET ACCESSED #
OR NOT D1$ON[INTSM]
THEN # DRD IS OFF OR IN MAINT MODE #
BEGIN # NOT ON #
IF D1$DIAG[INTSM] ##
AND NOT D1$DAG$ACK[INTSM]
THEN # DRD IN MAINTENANCE MODE #
BEGIN # MAINT #
TEXT$WDS[0] = KSM10;
END # MAINT #
ELSE # DRD IS OFF #
BEGIN # OFF #
TEXT$WDS[0] = KSM8;
END # OFF #
END # NOT ON #
ELSE
BEGIN # DRD1 IS ON #
P<LLRQ> = D1$LLADR[INTSM];
IF LLR$PRCNME[0] EQ REQTYP4"INITHW" # DRD TURNING ON #
OR LLR$RQI[0] EQ REQNAME"RQIAUCP" # ABORTED UCP #
OR NOT D1$FULL[INTSM]
THEN # DRD NOT IN USE #
BEGIN # DRD1 IS IDLE #
TEXT$WDS[0] = KSM9;
END
ELSE
BEGIN # DRD1 IS ACTIVE - BUILD STATUS LINE #
IF LLR$RQI[0] NQ REQNAME"RQIINT" # NOT STAGE OR DESTAGE #
THEN
BEGIN # DRD1 PROCESSING UTILITY REQUEST #
TEXT$WDS[0] = KSM7;
END
ELSE # DRD1 PROCESSING STAGE/DESTAGE REQUEST #
BEGIN # GET HLRQ AND TDAM VALUES FOR K-DISPLAY#
HB$LINE[0] = KSM4; # MOVE HEADER TO BUFFER #
P<HLRQ> = LLR$UCPRA;
P<TDAM> = LOC(HLR$TDAM);
P<FETSET> = LLR$DSKFET[0];
KP$FN = TDAMPFN;
KP$UI = TDAMUI;
IF HLR$HPN EQ HLRPN"STAGE"
THEN
BEGIN # STAGE MESSAGE NEEDED #
TEXT$WDS[0] = KSM5;
KP$PU = FET$CRI[0] + HLR$PRU[0]; # STAGING DIFFERENT #
KP$JN = TDAMJSN;
END
ELSE
BEGIN # DESTAGE MESSAGE NEEDED #
TEXT$WDS[0] = KSM6;
KP$PU = FET$CRI[0];
KP$JN = LTC$SFJBSN[DSC$LTCT];
END
IF P<FETSET> EQ 0
THEN # GET SAVED PRU COUNT #
BEGIN # SAVED #
KP$PU = HLR$PRU[0];
END # SAVED #
END # GET HLRQ AND TDAM VALUES FOR K-DISPLAY #
END # DRD1 IS ACTIVE - BUILD STATUS LINE #
END # DRD1 IS ON #
KPFILL(TEXT[0],LOC(KSM$WORD[0]));
KL$LINE[LF$SMDRD1] = TEXT$WDS[0];
KL$LINE[LF$SMINFO+4] = HB$LINE[0]; # DISPLAY BUFFER CONTENTS #
RETURN;
END # KDSM #
TERM
PROC KFILES(REJECT);
# TITLE KFILES - PROCESS *K* DISPLAY *FILES* COMMAND. #
BEGIN # KFILES #
#
** KFILES - PROCESS *K* DISPLAY *FILES* COMMAND.
*
* *KFILES* PROCESSES THE OPERATOR COMMAND, *FILES,N*, WHERE
* *N* IS THE REQUESTED NUMBER OF LARGE STREAMING BUFFERS TO
* BE AUTHORIZED.
*
* PROC KFILES(REJECT)
*
* ENTRY ARRAY KBINPUT (DEFINED IN *COMBKDA*) CONTAINS THE
* IMAGE OF THE *FILES* REQUEST.
*
* EXIT (REJECT) - REJECT OPERATOR RESPONSE FLAG.
* = TRUE, INCORRECT REPONSE OR COMMAND.
* = FALSE, VALID RESPONSE OR COMMAND.
*
* MESSAGES * VALUE OF X USED ON *FILES* COMMAND.*.
* (DISPLAYED ON *K* DISPLAY REJECT LINE, IF THE
* ORDINAL SPECIFIED WAS OUT OF RANGE AND A VALUE
* OF *X* WAS ASSUMED.)
#
ITEM REJECT B; # REJECT OPERATOR RESPONSE FLAG #
#
**** PROC KFILES - XREF LIST BEGIN.
#
XREF
BEGIN
FUNC XCDD I; # CONVERT TO DECIMAL DISPLAY #
FUNC XDXB I; # CONVERT DISPLAY TO INTEGER #
END
#
**** PROC KFILES - XREF LIST END.
#
DEF LISTCON #0#; # DO NOT LIST COMDECKS #
*CALL COMBFAS
*CALL COMBKDA
*CALL COMBKDD
*CALL COMBUDT
*CALL COMXBST
*CALL COMXCTF
ITEM I U; # INDUCTION VARIABLE #
ITEM ORDINAL I; # REQUESTED *FILES* ORDINAL #
ITEM STAT I; # CONVERSION STATUS VALUE #
ARRAY MSG [0:0] S(4); # HOLDS INFORMATIVE MESSAGE #
BEGIN
ITEM MSG$LINE C(00,00,40) # FULL MESSAGE LINE #
= [" VALUE OF X USED ON *FILES* COMMAND."];
ITEM MSG$ORD C(01,00,01); # ORDINAL DISPLAYED #
END
CONTROL EJECT;
#
* CHECK FOR VALID NUMERIC ORDINAL.
#
REJECT = FALSE;
STAT = XDXB(KB$FILEORD[0],1,ORDINAL);
IF STAT NQ 0
THEN
BEGIN
REJECT = TRUE;
RETURN;
END
#
* CHECK FOR AN OUT OF RANGE ORDINAL. IF THE SPECIFIED ORDINAL
* IS LESS THAN 1, ASSUME 1. IF IT IS GREATER THAN THE NUMBER
* OF *MASSTOR CONTROLLERS* TIMES CHANNELS ON EACH CONTROLLER,
* A VALUE OF *MAX$ACHN* IS USED.
#
IF ORDINAL LS 1
THEN # USE MINIMUM VALUE #
BEGIN
ORDINAL = 1;
MSG$ORD[0] = "1";
KL$LINE[LF$KBREJ] = MSG$LINE[0]; # INFORMATIVE MESSAGE #
END
IF ORDINAL GR MAX$ACHN
THEN # USE MAXIMUM VALUE #
BEGIN
ORDINAL = MAX$ACHN;
MSG$ORD[0] = XCDD(MAX$ACHN);
KL$LINE[LF$KBREJ] = MSG$LINE[0]; # INFORMATIVE MESSAGE #
END
#
* CHANGE THE NUMBER OF AUTHORIZED BUFFERS, AS REQUIRED, SO THAT
* *ORDINAL* BUFFERS ARE NOW AUTHORIZED.
#
FASTFOR I = 1 STEP 1 UNTIL BSTL
DO
BEGIN
BST$AUTH[I] = I LQ ORDINAL;
END
END # KFILES #
TERM
PROC KINIT;
# TITLE KINIT - *K* DISPLAY INITIALIZATION. #
BEGIN # KINIT #
#
** KINIT - *K* DISPLAY INTIALIZATION.
*
* *KINIT* ISSUES THE *CONSOLE* MACRO TO ACTIVATE THE
* *K* DISPLAY AND INITIALIZES THE *K* DISPLAY BUFFERS.
*
* PROC KINIT.
*
* EXIT THE *CONSOLE* MACRO IS ISSUED.
* THE TITLE IS PLACED IN THE LEFT SCREEN BUFFER.
* THE *B* DISPLAY LINE 2 IS CLEARED.
*
* MESSAGES * REQUEST *K* DISPLAY * (FROM *CONSOLE* MACRO).
*
* NOTES CLEARS LINE 2 OF THE *B* DISPLAY AFTER ISSUING
* THE *CONSOLE* MACRO TO ERASE THE "REQUEST *K* DISPLAY"
* MESSAGE. THE *KPROC* AND *KREQ* ROUTINES ISSUE THE
* REQUEST-K MESSAGE AS NEEDED.
#
#
**** PROC KINIT - XREF LIST BEGIN.
#
XREF
BEGIN
PROC CONSOLE; # ISSUE *CONSOLE* MACRO #
PROC MESSAGE; # ISSUE *MESSAGE* MACRO #
END
#
**** PROC KINIT - XREF LIST END.
#
DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
*CALL COMBFAS
*CALL COMBKDA
*CALL COMBKDD
#
* CONSOLE MACRO PARAMETER ARRAY.
#
ARRAY CPARAM [0:0] S(1); # CONSOLE PARAMETER #
BEGIN
ITEM CP$KBADDR U(00,00,24); # KEYBOARD ADDRESS #
ITEM CP$KLADDR U(00,42,18); # LEFT SCREEN ADDRESS #
END
CONTROL EJECT;
#
* SET UP AND ISSUE THE CONSOLE MACRO.
#
CP$KBADDR[0] = LOC(KBINPUT[0]);
CP$KLADDR[0] = LOC(KLEFTSCRN[0]);
CONSOLE(CPARAM[0]);
#
* CLEAR REQUEST-K MESSAGE ON *B* DISPLAY.
#
MESSAGE(BZEROES,LINE2);
KL$COMP[0] = FALSE;
KREQCLEAR = TRUE;
#
* SET UP TITLE LINE IN LEFT SCREEN BUFFER.
#
KL$LINE[LF$TITLE] = TITLELINE;
KL$LINE[LF$TITLEDIS] = DISPSIT;
#
* SET UP *VALID COMMANDS* MENU IN LEFT SCREEN BUFFER.
#
KL$LINE[LF$VALCMD] = VALIDCMD;
KL$LINE[LF$VALCMD+1] = KXGOLINE;
KL$LINE[LF$VALCMD+2] = STDSLINE;
KL$LINE[LF$VALCMD+3] = SMLINE;
KL$LINE[LF$VALCMD+4] = STLINE;
KL$LINE[LF$VALCMD+5] = DSLINE;
KSMDISP = FALSE; # *SM* DISPLAY NOT ON LEFT SCREEN #
KSMID = "A"; # PRESET DEFAULT FOR SM DISPLAY #
END # KINIT #
TERM
PROC KINPUT;
# TITLE KINPUT - KEYBOARD INPUT. #
BEGIN # KINPUT #
#
** KINPUT - KEYBOARD INPUT.
*
* *KINPUT* PROCESSES THE OPERATOR RESPONSES OR COMMANDS.
*
* PROC KINPUT.
*
* ENTRY ARRAY KBINPUT - KEYBOARD BUFFER.
*
* EXIT FOR A VALID OPERATOR RESPONSE -
* THE *KWORD* REQUEST (IF IT IS STILL AVAILABLE)
* IS COMPLETED AND DELINKED.
* THE LEFT SCREEN AREA FOR THE RESPONSE IS CLEARED.
*
* FOR A VALID OPERATOR COMMAND -
* THE DEFINED PROCESSING IS DONE.
*
* FOR AN INCORRECT OPERATOR TYPE-IN -
* THE TYPE-IN IS DISPLAYED IN THE ECHO LINE OF THE
* LEFT SCREEN.
* THE *** REJECT *** IS DISPLAYED IN THE REJECT LINE.
*
* ARRAY KBINPUT - KEYBOARD BUFFER CLEARED.
*
* NOTES RESPONSES ARE IN THE FORM - N.WORD
* WHERE N IS AN ORDINAL ON THE LEFT SCREEN,
* AND WORD IS *GO* OR *DROP*.
*
* COMMANDS ARE - *FILES,NN*.
*
* A BLANK IS ACCEPTED AND CLEARS ANY OUTSTANDING
* REJECT MESSAGE.
#
#
**** PROC KINPUT - XREF LIST BEGIN.
#
XREF
BEGIN
PROC ADD$LNK; # ADD ENTRY TO LINK #
PROC DEL$LNK; # DELETE ENTRY FROM LINK #
PROC KCLR; # CLEAR CURRENT REQUEST #
PROC KFILES; # PROCESS *FILES* COMMAND #
PROC KREQ; # *K* DISPLAY REQUEST #
PROC KSM; # PROCESS *SMI* COMMAND #
FUNC XDXB I; # CONVERT DISPLAY CODE TO INTEGER
#
PROC ZFILL; # ZERO FILL BUFFER #
END
#
**** PROC KINPUT - XREF LIST END.
#
DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
*CALL COMBFAS
*CALL COMBCHN
*CALL COMBKDA
*CALL COMBKDD
*CALL COMBTDM
*CALL COMXCTF
ITEM CH I; # CHARACTER INDEX #
ITEM CHAR C(1); # CHARACTER #
ITEM COMMAND C(10); # OPERATOR COMMAND #
ITEM I I; # TEMPORARY CELL #
ITEM LINK U; # ADDRESS OF NEW CHAIN ENTRY #
ITEM ORD I; # ORDINAL #
ITEM REJECT B; # REJECT RESPONSE FLAG #
ITEM RTDADR U; # *RTRQ* ADDRESS #
CONTROL EJECT;
KL$LINE[LF$KBREJ] = " "; # CLEAR REJECT LINE #
KL$LINE[LF$KBECHO] = " "; # CLEAR ECHO LINE #
#
* CRACK THE KEYBOARD INPUT. DETERMINE IF INPUT IS -
* . AN OPERATOR RESPONSE - N.COMMAND.
* . AN OPERATOR COMMAND - COMMAND,PARAMETER.
#
REJECT = FALSE; # INITIALIZE #
COMMAND = " ";
CH = 0;
CHAR = C<0,1>KB$SCAN[0]; # GET FIRST CHARACTER #
I = XDXB(CHAR,0,ORD);
IF I EQ 0 AND ORD GQ 1 AND ORD LQ 9
THEN # ORDINAL #
BEGIN # CHECK ORDINAL #
IF C<1,1>KB$SCAN[0] NQ "."
THEN # NO PERIOD FOLLOWS #
BEGIN
ORD = 0; # REJECT THE ORDINAL #
END
IF ORD GR KORD
THEN # INCORRECT ORDINAL #
BEGIN
ORD = 0; # REJECT THE ORDINAL #
END
END # CHECK ORDINAL #
IF ORD NQ 0
THEN # ORDINAL DETECTED AND GOOD #
BEGIN
CH = 2; # ADVANCE SCAN PAST ORDINAL #
END
#
* GET COMMAND ( MAXIMUM OF 10 CHARACTERS ).
* SCAN TO FIRST NON-ALPHANUMERIC.
#
C<0,1>COMMAND = C<CH,1>KB$SCAN[0]; # PRESET WITH FIRST CHAR #
SLOWFOR I = 1 STEP 1 WHILE I LQ 9 ##
AND C<I+CH,1>KB$SCAN[0] GQ "A" # VALID CHARACTER FOUND #
AND C<I+CH,1>KB$SCAN[0] LQ "9"
DO
BEGIN
C<I,1>COMMAND = C<I+CH,1>KB$SCAN[0];
END
#
* PROCESS THE OPERATOR RESPONSE.
#
IF ORD NQ 0
THEN # FORM IS N.COMMAND #
BEGIN # PROCESS OPERATOR RESPONSE #
#
* GET *KCURRENT* FOR THE ORDINAL.
#
P<KWORD> = LOC(KCUR$WD[ORD]); # *KCURRENT* ENTRY #
IF KCUR$WD[ORD] EQ 0
THEN # NO REQUEST ACTIVE #
BEGIN
REJECT = TRUE; # REJECT RESPONSE #
END
IF KCUR$ADDR[ORD] NQ 0
THEN # PLACE REPLY IN *KWORD* OF THE
CALLER #
BEGIN
P<KWORD> = KCUR$ADDR[ORD]; # *KWORD* REQUEST #
END
#
* COMMAND IS "GO" AND GO IS VALID.
#
IF COMMAND EQ "GO" AND KW$RPGO[0]
THEN
BEGIN
KW$OPGO[0] = TRUE;
END
#
* COMMAND IS "DROP" AND DROP IS VALID.
#
IF COMMAND EQ "DROP" AND KW$RPDROP[0]
THEN
BEGIN
KW$OPDROP[0] = TRUE;
END
#
* IF NO VALID RESPONSE, REJECT IT.
#
IF KW$OP[0] EQ 0
THEN
BEGIN
REJECT = TRUE; # REJECT #
END
#
* IF RESPONSE WAS VALID, CLEAR THE MESSAGES FOR THAT ORDINAL
* FROM THE LEFT SCREEN BUFFER AND DELINK THE REQUEST.
#
IF NOT REJECT
THEN
BEGIN
KCLR(ORD); # CLEAR FROM DISPLAY #
KREQ(P<KWORD>,KDELINK); # DELINK FROM QUEUE #
END
END # PROCESS OPERATOR RESPONSE #
#
* PROCESS THE OPERATOR COMMAND.
#
ELSE
BEGIN # PROCESS OPERATOR COMMAND #
REJECT = TRUE; # ASSUME WRONG #
#
* COMMAND IS "FILES".
#
IF COMMAND EQ "FILES"
THEN
BEGIN
KFILES(REJECT);
END
#
* COMMAND IS "SMI" OR
* "SMI,DRD=ST=N " OR
* "SMI,DRD=DS=N"
#
IF C<0,2>COMMAND EQ "SM"
THEN
BEGIN # PROCESS *SMI* COMMAND #
KSM(REJECT);
END
#
* COMMAND IS *STAGE* OR *DESTAGE*.
* TOGGLE DISPLAY AND SET FLAGS.
#
P<DISPOS> = LOC(KL$LINE[LF$TITLE + 1]);
IF COMMAND EQ "STAGE"
THEN
BEGIN
IF GLBSTFL
THEN
BEGIN
GLBSTFL = FALSE;
DISPOS$ST[0] = "CLOSE";
LINK = CHN$BOC[LCHN"RTD$ACT"];
REPEAT WHILE LINK NQ 0
DO
BEGIN # SEARCH *RTRQ* CHAIN #
P<TDAM> = LINK + 1;
RTDADR = LINK;
P<LINKWRD> = LINK;
LINK = LINK$ADR[0];
IF TDAMFC[0] EQ TDAMFCODE"STAGE"
THEN
BEGIN # REMOVE STAGE *RTRQ* ENTRY #
DEL$LNK(RTDADR,LCHN"RTD$ACT",0);
ZFILL(TDAM,TDAMLEN);
ADD$LNK(RTDADR,LCHN"RTD$FRSPC",0);
END
END # SEARCH *RTRQ* CHAIN #
RTRQ$CT = 0;
END
ELSE
BEGIN
GLBSTFL = TRUE;
DISPOS$ST[0] = " OPEN";
END
REJECT = FALSE;
END
IF COMMAND EQ "DESTAGE"
THEN
BEGIN
IF GLBDSFL
THEN
BEGIN
GLBDSFL = FALSE;
DISPOS$DT[0] = "CLOSE";
END
ELSE
BEGIN
GLBDSFL = TRUE;
DISPOS$DT[0] = " OPEN";
END
REJECT = FALSE;
END
#
* COMMAND IS BLANKS. ALLOWED TO CLEAR THE REJECT LINE (CLEAN UP).
#
IF COMMAND EQ " "
THEN # CLEAR #
BEGIN
REJECT = FALSE;
END
END # PROCESS OPERATOR COMMAND #
#
* IF RESPONSE WAS INCORRECT, ISSUE REJECT LINE.
#
IF REJECT
THEN # ISSUE REJECT #
BEGIN
KL$SUBL1[LF$KBREJ] = "*** REJECT ***";
KL$SUBL1[LF$KBECHO] = KB$SCAN[0]; # ISSUE ECHO #
END
KB$SCAN[0] = " "; # CLEAR KEYBOARD INPUT #
KB$CLEAR[0] = 0;
RETURN;
END # KINPUT #
TERM
PROC KPFILL(TEXT,(PADDR));
# TITLE KPFILL - *K* PARAMETER FILL ROUTINE. #
BEGIN # KPFILL #
#
** KPFILL - PARAMETER FILL ROUTINE.
*
* *KPFILL* INSERTS DEFINED PARAMETERS INTO THE *K* DISPLAY TEXT.
*
* PROC KPFILL(TEXT,(PADDR))
*
* ENTRY (TEXT) - THE *K* DISPLAY TEXT TO SCAN.
* (PADDR) - ADDRESS OF THE PARAMETER VALUES.
*
* EXIT (TEXT) - THE TEXT WITH PARAMETERS INSERTED.
*
* NOTES THE MAXIMUM SIZE OF A RESULTANT PARAMETER TO INSERT
* IN THE TEXT IS 10 CHARACTERS.
* THE MAXIMUM SIZE OF THE SCANNED TEXT IS 60 CHARACTERS.
#
ITEM TEXT C(60); # TEXT #
ITEM PADDR I; # ADDRESS OF PARAMETER #
#
**** PROC KPFILL - XREF LIST BEGIN.
#
XREF
BEGIN
PROC BZFILL; # BLANK OR ZERO FILL #
FUNC XCDD C(10); # CONVERT TO DECIMAL DISPLAY #
FUNC XCOD C(10); # CONVERT TO OCTAL DISPLAY #
END
#
**** PROC KPFILL - XREF LIST END.
#
DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
*CALL COMBFAS
*CALL,COMBBZF
*CALL COMBKDD
ITEM CHAR C(1); # CHARACTER FIELD #
ITEM FR I; # FROM INDEX #
ITEM I I; # TEMPORARY #
ITEM PCODE C(2); # PARAMETER CODE #
ITEM PI I; # PARAMETER INDEX #
ITEM PRESULT C(10); # PARAMETER RESULT #
ITEM TCOPY C(60); # COPY OF TEXT #
ITEM TO I; # TO INDEX #
#
* PARAMETER WORK AREA.
#
ARRAY PARWK [0:0] S(1);
BEGIN
ITEM PFIELDI I(00,00,60); # PARAMETER DEFINED AS INTEGER #
ITEM PFIELDC C(00,00,10); # PARAMETER REDEFINED CHARACTER #
END
#
* TO ACCESS THE CALLERS PARAMETER WORD(S).
#
BASED
ARRAY PARAMETER [0:0] S(1);
BEGIN
ITEM PARAM$WD U(00,00,60);
END
#
* ARRAY OF DEFINED PARAMETERS FOR *K* DISPLAY MESSAGE TEXTS.
* PARAMETERS ARE DEFINED IN *COMBKDD*.
#
ARRAY KPAR [1:1] S(KPNUM);
BEGIN
ITEM P1 C(00,00,02) = [ P1C ];
ITEM P1FW U(00,12,06) = [ P1W ];
ITEM P1FB U(00,18,06) = [ P1B ];
ITEM P1FL U(00,24,06) = [ P1L ];
ITEM P1CT U(00,30,06) = [ P1T ];
ITEM P1TS U(00,36,06) = [ P1S ];
ITEM P2 C(01,00,02) = [ P2C ];
ITEM P2FW U(01,12,06) = [ P2W ];
ITEM P2FB U(01,18,06) = [ P2B ];
ITEM P2FL U(01,24,06) = [ P2L ];
ITEM P2CT U(01,30,06) = [ P2T ];
ITEM P2TS U(01,36,06) = [ P2S ];
ITEM P3 C(02,00,02) = [ P3C ];
ITEM P3FW U(02,12,06) = [ P3W ];
ITEM P3FB U(02,18,06) = [ P3B ];
ITEM P3FL U(02,24,06) = [ P3L ];
ITEM P3CT U(02,30,06) = [ P3T ];
ITEM P3TS U(02,36,06) = [ P3S ];
ITEM P4 C(03,00,02) = [ P4C ];
ITEM P4FW U(03,12,06) = [ P4W ];
ITEM P4FB U(03,18,06) = [ P4B ];
ITEM P4FL U(03,24,06) = [ P4L ];
ITEM P4CT U(03,30,06) = [ P4T ];
ITEM P4TS U(03,36,06) = [ P4S ];
ITEM P5 C(04,00,02) = [ P5C ];
ITEM P5FW U(04,12,06) = [ P5W ];
ITEM P5FB U(04,18,06) = [ P5B ];
ITEM P5FL U(04,24,06) = [ P5L ];
ITEM P5CT U(04,30,06) = [ P5T ];
ITEM P5TS U(04,36,06) = [ P5S ];
ITEM P6 C(05,00,02) = [ P6C ];
ITEM P6FW U(05,12,06) = [ P6W ];
ITEM P6FB U(05,18,06) = [ P6B ];
ITEM P6FL U(05,24,06) = [ P6L ];
ITEM P6CT U(05,30,06) = [ P6T ];
ITEM P6TS U(05,36,06) = [ P6S ];
ITEM P7 C(06,00,02) = [ P7C ];
ITEM P7FW U(06,12,06) = [ P7W ];
ITEM P7FB U(06,18,06) = [ P7B ];
ITEM P7FL U(06,24,06) = [ P7L ];
ITEM P7CT U(06,30,06) = [ P7T ];
ITEM P7TS U(06,36,06) = [ P7S ];
ITEM P8 C(07,00,02) = [ P8C ];
ITEM P8FW U(07,12,06) = [ P8W ];
ITEM P8FB U(07,18,06) = [ P8B ];
ITEM P8FL U(07,24,06) = [ P8L ];
ITEM P8CT U(07,30,06) = [ P8T ];
ITEM P8TS U(07,36,06) = [ P8S ];
ITEM P9 C(08,00,02) = [ P9C ];
ITEM P9FW U(08,12,06) = [ P9W ];
ITEM P9FB U(08,18,06) = [ P9B ];
ITEM P9FL U(08,24,06) = [ P9L ];
ITEM P9CT U(08,30,06) = [ P9T ];
ITEM P9TS U(08,36,06) = [ P9S ];
ITEM P10 C(09,00,02) = [ P10C ];
ITEM P10FW U(09,12,06) = [ P10W ];
ITEM P10FB U(09,18,06) = [ P10B ];
ITEM P10FL U(09,24,06) = [ P10L ];
ITEM P10CT U(09,30,06) = [ P10T ];
ITEM P10TS U(09,36,06) = [ P10S ];
ITEM P11 C(10,00,02) = [ P11C ];
ITEM P11FW U(10,12,06) = [ P11W ];
ITEM P11FB U(10,18,06) = [ P11B ];
ITEM P11FL U(10,24,06) = [ P11L ];
ITEM P11CT U(10,30,06) = [ P11T ];
ITEM P11TS U(10,36,06) = [ P11S ];
ITEM P12 C(11,00,02) = [ P12C ];
ITEM P12FW U(11,12,06) = [ P12W ];
ITEM P12FB U(11,18,06) = [ P12B ];
ITEM P12FL U(11,24,06) = [ P12L ];
ITEM P12CT U(11,30,06) = [ P12T ];
ITEM P12TS U(11,36,06) = [ P12S ];
ITEM P13 C(12,00,02) = [ P13C ];
ITEM P13FW U(12,12,06) = [ P13W ];
ITEM P13FB U(12,18,06) = [ P13B ];
ITEM P13FL U(12,24,06) = [ P13L ];
ITEM P13CT U(12,30,06) = [ P13T ];
ITEM P13TS U(12,36,06) = [ P13S ];
ITEM P14 C(13,00,02) = [ P14C ];
ITEM P14FW U(13,12,06) = [ P14W ];
ITEM P14FB U(13,18,06) = [ P14B ];
ITEM P14FL U(13,24,06) = [ P14L ];
ITEM P14CT U(13,30,06) = [ P14T ];
ITEM P14TS U(13,36,06) = [ P14S ];
ITEM P15 C(14,00,02) = [ P15C ];
ITEM P15FW U(14,12,06) = [ P15W ];
ITEM P15FB U(14,18,06) = [ P15B ];
ITEM P15FL U(14,24,06) = [ P15L ];
ITEM P15CT U(14,30,06) = [ P15T ];
ITEM P15TS U(14,36,06) = [ P15S ];
ITEM P16 C(15,00,02) = [ P16C ];
ITEM P16FW U(15,12,06) = [ P16W ];
ITEM P16FB U(15,18,06) = [ P16B ];
ITEM P16FL U(15,24,06) = [ P16L ];
ITEM P16CT U(15,30,06) = [ P16T ];
ITEM P16TS U(15,36,06) = [ P16S ];
ITEM P17 C(16,00,02) = [ P17C ];
ITEM P17FW U(16,12,06) = [ P17W ];
ITEM P17FB U(16,18,06) = [ P17B ];
ITEM P17FL U(16,24,06) = [ P17L ];
ITEM P17CT U(16,30,06) = [ P17T ];
ITEM P17TS U(16,36,06) = [ P17S ];
ITEM P18 C(17,00,02) = [ P18C ];
ITEM P18FW U(17,12,06) = [ P18W ];
ITEM P18FB U(17,18,06) = [ P18B ];
ITEM P18FL U(17,24,06) = [ P18L ];
ITEM P18CT U(17,30,06) = [ P18T ];
ITEM P18TS U(17,36,06) = [ P18S ];
ITEM P19 C(18,00,02) = [ P19C ];
ITEM P19FW U(18,12,06) = [ P19W ];
ITEM P19FB U(18,18,06) = [ P19B ];
ITEM P19FL U(18,24,06) = [ P19L ];
ITEM P19CT U(18,30,06) = [ P19T ];
ITEM P19TS U(18,36,06) = [ P19S ];
ITEM P20 C(19,00,02) = [ P20C ];
ITEM P20FW U(19,12,06) = [ P20W ];
ITEM P20FB U(19,18,06) = [ P20B ];
ITEM P20FL U(19,24,06) = [ P20L ];
ITEM P20CT U(19,30,06) = [ P20T ];
ITEM P20TS U(19,36,06) = [ P20S ];
ITEM P21 C(20,00,02) = [ P21C ];
ITEM P21FW U(20,12,06) = [ P21W ];
ITEM P21FB U(20,18,06) = [ P21B ];
ITEM P21FL U(20,24,06) = [ P21L ];
ITEM P21CT U(20,30,06) = [ P21T ];
ITEM P21TS U(20,36,06) = [ P21S ];
ITEM P22 C(21,00,02) = [ P22C ];
ITEM P22FW U(21,12,06) = [ P22W ];
ITEM P22FB U(21,18,06) = [ P22B ];
ITEM P22FL U(21,24,06) = [ P22L ];
ITEM P22CT U(21,30,06) = [ P22T ];
ITEM P22TS U(21,36,06) = [ P22S ];
ITEM P23 C(22,00,02) = [ P23C ];
ITEM P23FW U(22,12,06) = [ P23W ];
ITEM P23FB U(22,18,06) = [ P23B ];
ITEM P23FL U(22,24,06) = [ P23L ];
ITEM P23CT U(22,30,06) = [ P23T ];
ITEM P23TS U(22,36,06) = [ P23S ];
END
#
* TO ACCESS THE PARAMETERS DEFINED IN THE ARRAY *KPAR*.
#
BASED
ARRAY PARTABLE [0:0] S(1); # PARAMETER TABLE #
BEGIN
ITEM PAR$CDE C(00,00,02); # CODE #
ITEM PAR$FWD U(00,12,06); # FROM WORD OFFSET #
ITEM PAR$FBIT U(00,18,06); # FROM STARTING BIT #
ITEM PAR$FLEN U(00,24,06); # FROM LENGTH IN BITS #
ITEM PAR$CONV U(00,30,06); # CONVERSION TYPE #
ITEM PAR$TSIZ U(00,36,06); # TO SIZE IN CHARACTERS #
END
CONTROL EJECT;
P<PARTABLE> = LOC(KPAR); # TABLE OF DEFINED PARAMETERS #
P<PARAMETER> = PADDR; # PARAMETER VALUES #
TCOPY = " "; # CLEAR TCOPY #
TO = 0; # TO INDEX #
FR = 0; # FROM INDEX #
#
* MOVE FROM *TEXT* TO *TCOPY* ONE CHARACTER AT A TIME. IF
* A PARAMETER CODE (*CODE*) IS DETECTED, MOVE THE PARAMETER
* AS DEFINED IN *PARTABLE* INTO THE *TCOPY*.
#
REPEAT WHILE TO LS 60 AND FR LS 60
DO
BEGIN # TRANSFER *K* DISPLAY TEXT #
CHAR = C<FR,1>TEXT; # GET CHARACTER #
IF CHAR NQ "*"
THEN # MOVE CHARACTER INTO TEXT #
BEGIN
C<TO,1>TCOPY = CHAR;
TO = TO + 1; # ADVANCE *TO* #
FR = FR + 1; # ADVANCE *FROM* #
TEST DUMMY;
END
PCODE = C<FR+1,2>TEXT; # GET PARAMETER CODE #
#
* SEARCH PARAMETER TABLE FOR MATCH ON PARAMETER CODE.
* DO SPECIFIED CONVERSION, IF ANY, AND MOVE
* PARAMETER INTO MESSAGE TEXT.
#
FOR PI = 0 STEP 1 WHILE PI LS KPNUM
DO
BEGIN # PROCESS PARAMETER #
IF PAR$CDE[PI] NQ PCODE
THEN
BEGIN
TEST PI;
END
#
* GET PARAMETER VALUE.
#
I = PAR$FWD[PI]; # WORD OFFSET #
PFIELDI[0] = B<PAR$FBIT[PI],PAR$FLEN[PI]>PARAM$WD[I];
#
* CONVERT TO CHARACTER DISPLAY IF SPECIFIED.
#
IF PAR$CONV[PI] EQ ALF
THEN
BEGIN # ALF #
PRESULT = PFIELDC[0];
BZFILL(PRESULT,TYPFILL"BFILL",10); # BLANK FILL PARAM #
END # ALF #
#
* CONVERT TO DECIMAL DISPLAY IF SPECIFIED.
#
IF PAR$CONV[PI] EQ DEC
THEN
BEGIN
PRESULT = XCDD(PFIELDI[0]);
END
#
* CONVERT TO OCTAL DISPLAY IF SPECIFIED.
#
IF PAR$CONV[PI] EQ OCTL
THEN
BEGIN
PRESULT = XCOD(PFIELDI[0]);
END
#
* MOVE PARAMETER VALUE INTO TEXT.
#
C<TO,PAR$TSIZ[PI]>TCOPY = ##
C<10-PAR$TSIZ[PI],PAR$TSIZ[PI]>PRESULT;
TO = TO + PAR$TSIZ[PI];
FR = FR + 3; # ADVANCE PAST PARAMETER CODE #
TEST DUMMY;
END # PROCESS PARAMETER #
END # TRANSFER *K* DISPLAY TEXT #
TEXT = TCOPY; # RETURN NEW TEXT #
END # KPFILL #
TERM
PROC KPROC;
# TITLE KPROC - *K* DISPLAY PROCESSOR. #
BEGIN # KPROC #
#
** KPROC - *K* DISPLAY PROCESSOR.
*
* *KPROC* DETERMINES IF THERE IS ANY WORK TO DO FOR THE
* *K* DISPLAY AND IF SO, CALLS THE *K* DISPLAY OVERLAY.
* IT ALSO UPDATES THE *B* DISPLAY REQUEST-K MESSAGE
* AS NECESSARY.
*
* PROC KPROC.
*
* ENTRY (KACTCOUNT) - NUMBER OF REQUESTS CURRENTLY
* IN THE BODY OF THE LEFT SCREEN.
* (KLINKQ) - HEAD OF K-QUEUE.
* = 0 IF EMPTY.
* (KNEWREQ) - FLAG INDICATES NEW REQUESTS EXIST.
* (KREQCLEAR) - FLAG TO INDICATE THE REQUEST-K
* MESSAGE IS NOT ON THE *B* DISPLAY.
* ARRAY KBINPUT - KEYBOARD INPUT BUFFER.
* ARRAY KLEFTSCRN - LEFT SCREEN BUFFER.
* (KL$COMP) - COMPLETE FLAG IN LEFT SCREEN BUFFER.
* = 0 IF *DSD* IS NOT PROCESSING *K*.
* = 1 IF *DSD* IS PROCESSING *K*.
*
* EXIT (KREQCLEAR) - REQUEST-K FLAG.
* (KTIMER) - COUNTER TO REFRESH REQUEST-K MESSAGE.
*
* MESSAGES * REQUEST *K* DISPLAY *.
*
* NOTES CALLS *K* DISPLAY OVERLAY ONLY IF THERE IS
* WORK TO PROCESS.
*
* REFRESHES THE REQUEST-K MESSAGE ON THE *B* DISPLAY
* AS NECESSARY.
*
* CLEARS THE REQUEST-K MESSAGE AS NECESSARY.
*
* *DSD* SETS THE *KL$COMP* FLAG IN THE LEFT SCREEN
* BUFFER WHILE IT IS PROCESSING THE *K* DISPLAY.
#
#
**** PROC KPROC - XREF LIST BEGIN.
#
XREF
BEGIN
FUNC XCDD C(10); # BINARY TO DISPLAY (DECIMAL) #
PROC SSOVL; # LOAD OVERLAY #
PROC MESSAGE; # ISSUE *MESSAGE* MACRO #
PROC RTIME; # GET TIME SINCE LAST DEAD START #
END
#
**** PROC KPROC - XREF LIST END.
#
DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
*CALL COMBFAS
*CALL COMXCTF
*CALL COMXIPR
*CALL COMBKDA
*CALL COMBKDD
*CALL COMXMSC
*CALL COMBOVL
CONTROL EJECT;
#
* DETERMINE IF THERE IS WORK TO DO.
#
P<DISPOS> = LOC(KL$LINE[LF$TITLE + 1]);
CH$10[0] = XCDD(RTRQ$CT);
DISPOS$RTRQ[0] = CH$04[0];
IF KB$CLEAR[0] NQ 0 # CONSOLE INPUT #
OR (KACTCOUNT LS KORD AND KNEWREQ) # NEW REQUEST #
OR (KSMDISP AND KL$COMP[0]) # SM DISPLAY UP #
THEN
BEGIN
SSOVL(LKDISPLY,0); # LOAD *KDISPLAY* OVERLAY #
END
#
* CLEAR REQUEST-K IF NO ACTIVE DISPLAYS.
#
IF (KACTCOUNT EQ 0 # NO MESSAGES TO DISPLAY #
OR KL$COMP[0]) # MESSAGES BEING DISPLAYED #
AND NOT KREQCLEAR # *REQUEST-K* MESSAGE UP #
THEN # *REQUEST-K* NO LONGER NEEDED #
BEGIN
MESSAGE(BZEROES,LINE2);
KREQCLEAR = TRUE; # FLAG IT IS CLEAR #
END
#
* REFRESH REQUEST-K MESSAGE ON *B* DISPLAY IF THERE ARE
* REQUESTS TO PROCESS BUT THE *K* DISPLAY IS NOT ACTIVE.
#
IF KACTCOUNT NQ 0
THEN
BEGIN # REFRESH (REQUEST *K* DISPLAY) MESSAGE #
RTIME(RTIMESTAT[0]);
KDIS$EXPIR = RTIMSECS[0] + KDIS$INTV;
KTIMER = KTIMER - 1;
IF KTIMER LS 0
THEN # TIMER EXPIRED #
BEGIN
IF NOT KL$COMP[0]
THEN # *K* DISPLAY MUST NOT BE ACTIVE #
BEGIN
MESSAGE("$ REQUEST *K* DISPLAY ",LINE2);
KREQCLEAR = FALSE;
END
KTIMER = KRESET; # RESET TIMER #
KL$COMP[0] = FALSE; # SET TOGGLE OFF ( ON BY *DSD* ) #
END
END # REFRESH (REQUEST *K* DISPLAY) MESSAGE #
ELSE # DO NOT KEEP EXEC FROM IDLING #
BEGIN # IDLE #
KDIS$EXPIR = 0;
END # IDLE #
#
* KEEP EXEC ACTIVE TO REFRESH THE SM DISPLAY
* IF IT IS ON THE SCREEN.
#
IF KSMDISP AND KL$COMP[0] # SM DISPLAY ON SCREEN #
THEN # KEEP EXEC ACTIVE #
BEGIN # ACTIVE #
RTIME(RTIMESTAT[0]);
KSM$EXPIR = RTIMSECS[0] + KSM$INTV;
KL$COMP[0] = FALSE; # DONE PROCESSING SM DISPLAY #
KTIMER = KRESET; # RESET *DSD* TIMER #
END # ACTIVE #
ELSE # NOTHING UP TO REFRESH #
BEGIN # TIMEOUT #
KTIMER = KTIMER - 1; # TIMEOUT IN CASE *DSD* SLOW #
IF KTIMER LS 0
THEN # DSD NOT PROCESSING SM DISPLAY #
BEGIN # IDLE #
KSM$EXPIR = 0; # DO NOT FORCE EXEC ACTIVE #
END # IDLE #
END # TIMEOUT #
END # KPROC #
TERM
PROC KREQ((KWADDR),(RTYP));
# TITLE KREQ - *K* DISPLAY REQUEST. #
BEGIN # KREQ #
#
** KREQ - *K* DISPLAY REQUEST.
*
* *KREQ* LINKS A NEW REQUEST TO THE *K* DISPLAY QUEUE
* OR DELINKS AN OLD REQUEST FROM THE *K* DISPLAY QUEUE.
*
* PROC KREQ((KWADDR),(RTYP))
*
* ENTRY (KWADDR) - ADDRESS OF *KWORD* ARRAY.
* (RTYP) - REQUEST TYPE.
* = *KLINK* TO ADD THE REQUEST TO THE QUEUE.
* = *KDELINK* TO DELINK THE REQUEST FROM
* THE QUEUE.
* (KLINKQ) - THE HEAD OF THE K-QUEUE.
*
* EXIT THE *KWORD* HAS BEEN LINKED/DELINKED.
*
* FOR A *KLINK*, THE REQUEST-K MESSAGE IS ISSUED AND
* (KREQCLEAR) = FALSE, REQUEST-K MESSAGE IS UP.
* (KNEWREQ) - IS SET TRUE IF A NEW REQUEST
* WAS ADDED.
*
* FOR A *KDELINK*, THE LEFT SCREEN AREA IS BLANKED
* IF THE *KWORD* ENTRY IS CURRENTLY ON THE SCREEN.
*
* MESSAGES * REQUEST *K* DISPLAY * (IF *KLINK* REQUEST).
*
* NOTES FOR *KLINK* PROCESSING -
* . SKIP THE REQUEST IF IT IS ALREADY IN QUEUE.
* . ADD TO END OF K-QUEUE.
* . ISSUE THE REQUEST-K MESSAGE.
*
* FOR *KDELINK* PROCESSING -
* . SKIP THIS REQUEST IF IT IS NOT IN THE QUEUE.
* . CLEAR THE SCREEN LINES FOR THIS REQUEST IF IT IS
* CURRENTLY ACTIVE ON THE LEFT SCREEN.
* . SET COMPLETE IN *KWORD* ARRAY.
* . DELINK THE REQUEST FROM THE QUEUE.
#
ITEM KWADDR I; # ADDRESS OF *KWORD* ARRAY #
ITEM RTYP I; # REQUEST TYPE #
#
**** PROC KREQ - XREF LIST BEGIN.
#
XREF
BEGIN
PROC KCLR; # CLEAR CURRENT ON *K* DISPLAY #
PROC MESSAGE; # ISSUE *MESSAGE* MACRO #
END
#
**** PROC KREQ - XREF LIST END.
#
DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
*CALL COMBFAS
*CALL COMBKDA
*CALL COMBKDD
*CALL COMXCTF
ITEM CURRKW I; # CURRENT *KWORD* ADDRESS #
ITEM ORD I; # AN ORDINAL #
ITEM PREVKW I; # PREVIOUS *KWORD* ADDRESS #
CONTROL EJECT;
#
* SEARCH K-QUEUE UNTIL END (ZERO) OR A MATCH ON *KWADDR*.
* SETS - *PREVKW* = ADDRESS OF PREVIOUS *KWORD* IN QUEUE.
* - *CURRKW* = ADDRESS OF CURRENT *KWORD* OR ZERO(END).
#
CURRKW = LOC(KLINKQ); # START AT HEAD #
REPEAT WHILE CURRKW NQ 0 AND CURRKW NQ KWADDR
DO
BEGIN
PREVKW = CURRKW; # SET PREVIOUS #
P<KWORD> = CURRKW;
CURRKW = KW$LINK[0]; # GET NEXT IN QUEUE #
END
#
* PROCESS THE LINK REQUEST.
#
IF RTYP EQ KLINK
THEN # LINK TO QUEUE #
BEGIN # LINK #
IF CURRKW NQ 0
THEN # FOUND MATCH IN QUEUE #
BEGIN
RETURN; # IGNORE THIS REQUEST #
END
#
* INITIALIZE *KWORD* ARRAY FIELDS.
#
P<KWORD> = KWADDR;
KW$KCTL[0] = 0; # CLEAR K-CONTROLLED AREA #
KW$LINK[0] = 0; # SET LINK AT END #
#
* LINK *KWORD* TO END OF QUEUE.
#
P<KWORD> = PREVKW;
KW$LINK[0] = KWADDR; # PREVIOUS POINTS TO NEW #
KNEWREQ = TRUE;
#
* ISSUE THE REQUEST-K MESSAGE.
#
MESSAGE("$ REQUEST *K* DISPLAY ",LINE2);
KREQCLEAR = FALSE;
RETURN; # EXIT #
END # LINK #
#
* PROCESS THE DELINK REQUEST.
#
IF RTYP EQ KDELINK
THEN # DELINK FROM QUEUE #
BEGIN # DELINK #
IF CURRKW EQ 0
THEN # NO MATCH IN QUEUE #
BEGIN
RETURN; # IGNORE THIS REQUEST #
END
#
* IF REQUEST IS CURRENTLY ACTIVE ON *K* DISPLAY, CLEAR IT.
#
P<KWORD> = CURRKW;
IF KW$ACT[0]
THEN # CURRENTLY ON *K* #
BEGIN # CLEAR K DISPLAY ENTRY #
#
* LOOK FOR *KWORD* ENTRY IN *KCURRENT*.
#
FOR ORD = 1 STEP 1 WHILE ORD LQ KORD
DO
BEGIN
IF KCUR$ADDR[ORD] EQ KWADDR
THEN # FOUND MATCH #
BEGIN
KCLR(ORD); # CLEAR FROM *K* DISPLAY #
END
END
END # CLEAR K DISPLAY ENTRY #
#
* SET COMPLETE ON THIS REQUEST.
#
P<KWORD> = KWADDR;
KW$COMP[0] = TRUE;
DRVRRECALL = TRUE; # SET TO RECALL THE DRIVER #
#
* DELINK IT FROM QUEUE.
#
CURRKW = KW$LINK[0]; # NEXT IN QUEUE #
P<KWORD> = PREVKW;
KW$LINK[0] = CURRKW; # LINK PREVIOUS TO NEXT #
RETURN;
END # DELINK #
END # KREQ #
TERM
PROC KSM(REJECT);
# TITLE KSM - PROCESS *SMI* COMMAND. #
BEGIN # KSM #
#
** KSM - PROCESS *SMI* COMMAND.
*
* *KSM* PROCESSES BOTH FORMS OF THE *SM* OPERATOR COMMAND.
* THE TWO FORMS OF THE COMMAND ARE:
* 1. *SMI*, WHERE *I* IS THE SM IDENTIFIER
*
* THIS FORM OF THE COMMAND CAUSES INFORMATION FOR THE
* SPECIFIED *SM* TO BE DISPLAYED.
*
* 2. *SMI,DRD=XX=N*
* WHERE *I* IS THE *SM* IDENTIFIER
* *XX* IS THE LITERAL *ST* (STAGE) OR *DS* (DESTAGE)
* *N* IS MAXIMUM NUMBER OF DRDS (0, 1, OR 2)
*
* THIS FORM OF THE COMMAND CAUSES THE MAXIMUM NUMBER OF
* DRDS PERMITTED FOR STAGING (*ST*) OR DESTAGING (*DS*)
* TO BE REDEFINED WITH THE SPECIFIED VALUE OF *N* (0, 1,
* OR 2).
*
* PROC KSM(REJECT).
*
* ENTRY ARRAY KBINPUT (DEFINED IN *COMBKDD*) CONTAINS THE
* IMAGE OF THE *SMI* COMMAND.
*
* EXIT *SM* PORTION OF *K* DISPLAY HAS BEEN UPDATED.
*
* MESSAGES
*
*
*
*
#
#
**** PROC KSM - XREF LIST BEGIN.
#
XREF
BEGIN
PROC KDSM; # PAINT *SM* PORTION OF K-DISPLAY #
FUNC XDXB I; # CONVERT DISPLAY TO INTEGER #
END
#
**** PROC KSM - XREF LIST END.
#
DEF LISTCON #0#; # DO NOT LIST COMDECKS #
*CALL COMBFAS
*CALL COMBKDA
*CALL COMBKDD
*CALL COMBUDT
ITEM CHDRD C(1); # CHARACTER VALUE FOR DRDS #
ITEM FINDSM B; # STORAGE MODULE FOUND IN UDT #
ITEM I I; # INTEGER VALUE FOR DRDS #
ITEM NUMDRD I; # NUMBER OF DRDS FOR ST OR DS #
ITEM REJECT B; # REJECT OPERATOR RESPONSE FLAG #
ITEM TEMPSM C(1); # *SM* ID FROM INPUT COMMAND #
CONTROL EJECT;
#
* CHECK FOR VALID *SM* COMMAND.
#
REJECT = FALSE; # ASSUME VALID COMMAND #
TEMPSM = C<2,1>KB$SCAN[0];
FINDSM = FALSE; # LOCATED SM IN UDT FLAG #
SLOWFOR I = 1 STEP 1 UNTIL MAXSMUNIT
DO
BEGIN # CHECK FOR SM ID IN EACH UDT #
IF SM$ID[I] EQ TEMPSM
THEN
BEGIN # SM LOCATED IN UDT #
FINDSM = TRUE;
KUDTIND = I;
TEST I;
END
END # CHECK FOR SM ID IN EACH UDT #
IF NOT FINDSM # SM NOT DEFINED IN THE UDT #
OR TEMPSM EQ 0 ##
OR KACTCOUNT NQ 0 # MESSAGE(S) AWAITING "GO" #
OR (C<3,1>KB$SCAN[0] NQ " " # NOT VALID POST-CHARACTERS #
AND C<3,1>KB$SCAN[0] NQ 0
AND C<3,5>KB$SCAN[0] NQ ",DRD=")
THEN
BEGIN # INVALID #
REJECT = TRUE;
RETURN;
END # INVALID #
IF C<3,5>KB$SCAN[0] EQ ",DRD="
THEN
BEGIN # COMMAND FORM *SMI,DRD=.....* #
#
* COMMAND FORM IS *SMI,DRD=ST=N*
* OR *SMI,DRD=DS=N*
#
CHDRD = C<11,1>KB$SCAN[0]; # NUMBER DRDS FOR ST OR DS #
I = XDXB(CHDRD,0,NUMDRD);
IF NOT (I EQ 0 AND NUMDRD GQ 0
AND NUMDRD LQ MAX$SMDRD)
THEN # INVALID NUMBER OF DRDS SPECIFIED #
BEGIN # DO NOT ALTER *UDT* #
REJECT = TRUE;
RETURN;
END
#
* COMMAND FORM *SMI,DRD=ST=N* OR *SMI,DRD=DS=N* IS VALID.
#
IF C<8,3>KB$SCAN[0] EQ "ST="
THEN # PARAMETER IS *ST* #
BEGIN # SET MAX DRDS FOR STAGING #
SM$STNUM[KUDTIND] = NUMDRD;
END
ELSE
BEGIN # PARAM MUST BE *DS* #
IF C<8,3>KB$SCAN[0] EQ "DS="
THEN
BEGIN # SET MAX DRDS FOR DESTAGING #
SM$DSNUM[KUDTIND] = NUMDRD;
END
ELSE
BEGIN # ST/DS PARAMETER IS INVALID #
REJECT = TRUE;
RETURN;
END
END # *DS* PARAM #
END # COMMAND FORM *SMI,DRD=.....* #
#
* AT THIS POINT, THE COMMAND HAS BEEN VALIDATED WHETHER IT IS THE
* *K.SMI* FORM OR THE *K.SMI,DRD.....* FORM. IF THE LATTER FORM,
* THE *UDT* HAS ALREADY BEEN UPDATED TO REFLECT THE NEW MAXIMUM
* NUMBER OF DRD-S FOR STAGING (*ST*) OR DESTAGING (*DS*). IT IS
* NOW TIME TO REPAINT THE K-DISPLAY TO REFLECT THE *SM* SELECTED.
#
KSMID = TEMPSM;
KDSM; # DISPLAY *SM* INFORMATION #
RETURN;
END # KSM #
TERM