CAT TITLE 'DMSCAT (CMS) VM/370 - RELEASE 6' 00001000 SPACE 2 00002000 *. 00003000 * MODULE: 00006000 * 00007000 * DMSCAT (CONATTN) 00008000 * 00009000 * FUNCTION: 00010000 * 00011000 * TO STACK A LINE OF INPUT THAT WILL LATER BE READ BY A 00012000 * CALL TO ROUTINE CMSCRD. 00013000 * 00014000 * ATTRIBUTES: 00015000 * 00016000 * NUCLEUS RESIDENT, REENTRANT, CALLED VIA SVC 00017000 * 00018000 * ENTRY POINT: 00019000 * 00020000 * DMSCAT 00021000 * 00022000 * ENTRY CONDITIONS: 00023000 * 00024000 * GPR1 = A(PLIST) 00025000 * 00026000 * PLIST DC CL8'ATTN' 00027000 * DC CL4'FIFO'|'LIFO' 00028000 * DC AL1 (LINE LENGTH) 00029000 * DC AL3 (LINE ADDRESS) 00030000 * 00031000 * EXIT CONDITION: 00032000 * 00033000 * GPR 15 = 0 00034000 * 00035000 * CALLS TO OTHER ROUTINES: 00036000 * 00037000 * DMSFREE - TO OBTAIN FREE STORAGE FOR A BUFFER. 00038000 * 00039000 * EXTERNAL REFERENCES: 00040000 * 00041000 * DMSFRE, DMSNUC 00042000 * 00043000 * TABLES/WORKAREAS: 00044000 * 00045000 * FROM DMSFREE - 17 DOUBLE WORDS 00046000 * 00047000 * REGISTER USAGE: 00048000 * 00049000 * GPRO-5-WORK REGS 00050000 * GPR6-11-NOT USED 00051000 * GPR12-BASE REGISTER 00052000 * GPR13-RETURN REG 00053000 * GPR14-LINKAGE 00054000 * GPR15-LINKAGE 00055000 * 00056000 * OPERATION: 00057000 * 00058000 * DMSCAT FIRST CHECKS FOR LINES CONTAINING HT OR RT. 00059000 * IF HT IS FOUND, THE HALT-TYPING FLAG IN MODULE DMSNUC 00060000 * IS TURNED ON. IF RT IS FOUND, THE HALT-TYPING FLAG 00061000 * IS TURNED OFF. IF THE LINE IS NOT HT OR RT, DMSCAT 00062000 * GETS 17 DOUBLE WORDS FROM FREE STORAGE BY CALLED 00063000 * DMSFREE AND MOVES THE LINE INTO THIS BUFFER. THE 00064000 * BUFFER CHAINED TO THE STACK OF FINISHED READ 00065000 * OPERATIONS. IF FIFO WAS SPECIFIED, THE BUFFER IS 00066000 * PLACED AT THE END OF THE LIST. IF LIFO IS SPECIFIED, 00067000 * THE BUFFER IS INSERTED AS THE FIRST ENTRY IN THE 00068000 * LIST. RETURN IS THEN MADE TO THE CALLER. 00069000 * 00070000 *. 00071000 EJECT 00072000 DMSCAT START 00073000 USING DMSCAT,R12 00074000 USING NUCON,R0 00075000 LR 12,15 00076000 LR 13,14 SAVE RETURN REGISTER 00077000 LA R2,0(R1) SAVE PARM LIST AND ZERO HI BYTE @VA02328 00078050 LA R1,CMNDLIST ADDR IF ENTERED FROM CONSOLE @VA00951 00078100 CR R1,R2 IS IT THAT CASE? @VA00951 00078200 BE PARMERR YES, DON'T RECOGNIZE IT @VA00951 00078300 L 4,12(,2) GET BUFFER ADDRESS 00079000 CLI 12(2),2 CHECK FOR LENGTH 2 00080000 BNE NOT2 IF NOT, DON'T CHECK FOR KT/RT 00081000 LH R3,0(R4) WORKING COPY OF COMMAND @VA02167 00082500 O R3,CAPSMSK CONVERT TO CAPS @VA02167 00083500 CH R3,=CL2'HT' HALT TYPING? @VA02167 00084500 BE KT GO TO OLD KILL TYPE RTN @VA02167 00085500 CH R3,=CL2'RT' RESUME TYPEING? @VA02167 00086500 BE RT 00089000 NOT2 LA 0,17 GO GET 17 DOUBLE WORDS 00090000 DMSFREE DWORDS=(0),TYPE=NUCLEUS,TYPCALL=BALR 00091000 XC 0(136,1),0(1) CLEAR OUT THE STORAGE 00092000 SR 3,3 GET (L'MSG) 00093000 IC 3,12(,2) INTO R3 00094000 CLI 12(2),130 INSURE NO MORE THAN 130 CHARACTERS TO 00095000 BNH LENOK MOVE TO BUFFER 00096000 LA 3,130 IF MORE, MOVE ONLY FIRST 130. 00097000 LENOK LTR 3,3 CHECK FOR ZERO LENGTH 00098000 BZ NOMOV IF ZERO, LEAVE BUFFER FULL OF ZEROS 00099000 BCTR 3,0 ELSE, REDUCE R3 FOR 'EX' MOVE 00100000 EX 3,MVMSG MOVE CALLER'S MSG INTO BUFFER 00101000 NOMOV MVI 4(1),X'4A' MAKE IT LOOK LIKE AN ATTENTION READ 00102000 MVI 5(1),130 OF 130 CHARACTERS 00103000 LH 3,NUMFINRD UPDATE FINISHED READ COUNT 00104000 LA 3,1(,3) .. 00105000 STH 3,NUMFINRD .. 00106000 LM 3,4,FSTFINRD FSTFINRD ---> R3, LSTFINRD ---> R4 00107000 CLC 8(4,2),=CL4'LIFO' DETERMINE WHICH CHAINING OPTION 00108000 BNE FIFO 00109000 * PATCH CHAIN FOR "LAST-IN-FIRST-OUT" ... 00110000 ST 3,0(,1) OLD POINTER GOES IN OUR BLOCK 00111000 LR 3,1 NEW 'FSTFINRD' INTO R3 00112000 LTR 4,4 ANY 'LSTFINRD' ? 00113000 BP STM34 BP IF YES. 00114000 B LR41 NEW 'LSTFINRD' IF NOT. 00115000 * 00116000 * PATCH CHAIN FOR "FIRST-IN-FIRST-OUT" ... 00117000 FIFO LTR 4,4 ANY 'LSTFINRD' ? 00118000 BP NEWLST BP IF YES, PATCH ONTO THE END. 00119000 LR 3,1 IF NOT, NEW 'FSTFINRD', 00120000 B LR41 AND NEW 'LSTFINRD' PER BELOW CODE. 00121000 * 00122000 NEWLST ST 1,0(,4) PATCH ONTO END OF PREVIOUS LAST BLOCK, 00123000 LR41 LR 4,1 NEW 'LSTFINRD' 00124000 STM34 STM 3,4,FSTFINRD STORE UPDATED 'FSTFINRD' & 'LSTFINRD' 00125000 EXIT LR 14,13 RESTORE RETURN REGISTER 00126000 SR 15,15 CLEAR ERROR FLAGS 00127000 BR 14 RETURN TO SVCINT 00128000 * 00129000 MVMSG MVC 6(0,1),0(4) 'EX' MOVE 00130000 SPACE 2 00131000 KT OI MSGFLAGS,NOTYPING TURN ON NO TYPING FLAG 00132000 B EXIT 00133000 RT NI MSGFLAGS,255-NOTYPING TURN OFF NO TYPING FLAG 00134000 B EXIT 00135000 PARMERR LA R15,3 RETURN UNKNOWN COMMAND @VA00951 00135100 OI MISFLAGS,NEGITS SET FLAG TO GO TO CP @VA06021 00135150 LNR R15,R15 ... @VA00951 00135200 BR R14 ... @VA00951 00135300 SPACE 3 00136000 DS 0F @VA02167 00136300 CAPSMSK DC CL4' ' CONVERT LOWER TO UPPER CASE @VA02167 00136600 LTORG 00137000 EJECT 00138000 NUCON 00139000 REGEQU 00140000 END 00141000