Table of Contents

DMSCAT Source

References

Source Listing

DMSCAT.ASSEMBLE.txt
  1. CAT TITLE 'DMSCAT (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * MODULE: 00006000
  5. * 00007000
  6. * DMSCAT (CONATTN) 00008000
  7. * 00009000
  8. * FUNCTION: 00010000
  9. * 00011000
  10. * TO STACK A LINE OF INPUT THAT WILL LATER BE READ BY A 00012000
  11. * CALL TO ROUTINE CMSCRD. 00013000
  12. * 00014000
  13. * ATTRIBUTES: 00015000
  14. * 00016000
  15. * NUCLEUS RESIDENT, REENTRANT, CALLED VIA SVC 00017000
  16. * 00018000
  17. * ENTRY POINT: 00019000
  18. * 00020000
  19. * DMSCAT 00021000
  20. * 00022000
  21. * ENTRY CONDITIONS: 00023000
  22. * 00024000
  23. * GPR1 = A(PLIST) 00025000
  24. * 00026000
  25. * PLIST DC CL8'ATTN' 00027000
  26. * DC CL4'FIFO'|'LIFO' 00028000
  27. * DC AL1 (LINE LENGTH) 00029000
  28. * DC AL3 (LINE ADDRESS) 00030000
  29. * 00031000
  30. * EXIT CONDITION: 00032000
  31. * 00033000
  32. * GPR 15 = 0 00034000
  33. * 00035000
  34. * CALLS TO OTHER ROUTINES: 00036000
  35. * 00037000
  36. * DMSFREE - TO OBTAIN FREE STORAGE FOR A BUFFER. 00038000
  37. * 00039000
  38. * EXTERNAL REFERENCES: 00040000
  39. * 00041000
  40. * DMSFRE, DMSNUC 00042000
  41. * 00043000
  42. * TABLES/WORKAREAS: 00044000
  43. * 00045000
  44. * FROM DMSFREE - 17 DOUBLE WORDS 00046000
  45. * 00047000
  46. * REGISTER USAGE: 00048000
  47. * 00049000
  48. * GPRO-5-WORK REGS 00050000
  49. * GPR6-11-NOT USED 00051000
  50. * GPR12-BASE REGISTER 00052000
  51. * GPR13-RETURN REG 00053000
  52. * GPR14-LINKAGE 00054000
  53. * GPR15-LINKAGE 00055000
  54. * 00056000
  55. * OPERATION: 00057000
  56. * 00058000
  57. * DMSCAT FIRST CHECKS FOR LINES CONTAINING HT OR RT. 00059000
  58. * IF HT IS FOUND, THE HALT-TYPING FLAG IN MODULE DMSNUC 00060000
  59. * IS TURNED ON. IF RT IS FOUND, THE HALT-TYPING FLAG 00061000
  60. * IS TURNED OFF. IF THE LINE IS NOT HT OR RT, DMSCAT 00062000
  61. * GETS 17 DOUBLE WORDS FROM FREE STORAGE BY CALLED 00063000
  62. * DMSFREE AND MOVES THE LINE INTO THIS BUFFER. THE 00064000
  63. * BUFFER CHAINED TO THE STACK OF FINISHED READ 00065000
  64. * OPERATIONS. IF FIFO WAS SPECIFIED, THE BUFFER IS 00066000
  65. * PLACED AT THE END OF THE LIST. IF LIFO IS SPECIFIED, 00067000
  66. * THE BUFFER IS INSERTED AS THE FIRST ENTRY IN THE 00068000
  67. * LIST. RETURN IS THEN MADE TO THE CALLER. 00069000
  68. * 00070000
  69. *. 00071000
  70. EJECT 00072000
  71. DMSCAT START 00073000
  72. USING DMSCAT,R12 00074000
  73. USING NUCON,R0 00075000
  74. LR 12,15 00076000
  75. LR 13,14 SAVE RETURN REGISTER 00077000
  76. LA R2,0(R1) SAVE PARM LIST AND ZERO HI BYTE @VA02328 00078050
  77. LA R1,CMNDLIST ADDR IF ENTERED FROM CONSOLE @VA00951 00078100
  78. CR R1,R2 IS IT THAT CASE? @VA00951 00078200
  79. BE PARMERR YES, DON'T RECOGNIZE IT @VA00951 00078300
  80. L 4,12(,2) GET BUFFER ADDRESS 00079000
  81. CLI 12(2),2 CHECK FOR LENGTH 2 00080000
  82. BNE NOT2 IF NOT, DON'T CHECK FOR KT/RT 00081000
  83. LH R3,0(R4) WORKING COPY OF COMMAND @VA02167 00082500
  84. O R3,CAPSMSK CONVERT TO CAPS @VA02167 00083500
  85. CH R3,=CL2'HT' HALT TYPING? @VA02167 00084500
  86. BE KT GO TO OLD KILL TYPE RTN @VA02167 00085500
  87. CH R3,=CL2'RT' RESUME TYPEING? @VA02167 00086500
  88. BE RT 00089000
  89. NOT2 LA 0,17 GO GET 17 DOUBLE WORDS 00090000
  90. DMSFREE DWORDS=(0),TYPE=NUCLEUS,TYPCALL=BALR 00091000
  91. XC 0(136,1),0(1) CLEAR OUT THE STORAGE 00092000
  92. SR 3,3 GET (L'MSG) 00093000
  93. IC 3,12(,2) INTO R3 00094000
  94. CLI 12(2),130 INSURE NO MORE THAN 130 CHARACTERS TO 00095000
  95. BNH LENOK MOVE TO BUFFER 00096000
  96. LA 3,130 IF MORE, MOVE ONLY FIRST 130. 00097000
  97. LENOK LTR 3,3 CHECK FOR ZERO LENGTH 00098000
  98. BZ NOMOV IF ZERO, LEAVE BUFFER FULL OF ZEROS 00099000
  99. BCTR 3,0 ELSE, REDUCE R3 FOR 'EX' MOVE 00100000
  100. EX 3,MVMSG MOVE CALLER'S MSG INTO BUFFER 00101000
  101. NOMOV MVI 4(1),X'4A' MAKE IT LOOK LIKE AN ATTENTION READ 00102000
  102. MVI 5(1),130 OF 130 CHARACTERS 00103000
  103. LH 3,NUMFINRD UPDATE FINISHED READ COUNT 00104000
  104. LA 3,1(,3) .. 00105000
  105. STH 3,NUMFINRD .. 00106000
  106. LM 3,4,FSTFINRD FSTFINRD ---> R3, LSTFINRD ---> R4 00107000
  107. CLC 8(4,2),=CL4'LIFO' DETERMINE WHICH CHAINING OPTION 00108000
  108. BNE FIFO 00109000
  109. * PATCH CHAIN FOR "LAST-IN-FIRST-OUT" ... 00110000
  110. ST 3,0(,1) OLD POINTER GOES IN OUR BLOCK 00111000
  111. LR 3,1 NEW 'FSTFINRD' INTO R3 00112000
  112. LTR 4,4 ANY 'LSTFINRD' ? 00113000
  113. BP STM34 BP IF YES. 00114000
  114. B LR41 NEW 'LSTFINRD' IF NOT. 00115000
  115. * 00116000
  116. * PATCH CHAIN FOR "FIRST-IN-FIRST-OUT" ... 00117000
  117. FIFO LTR 4,4 ANY 'LSTFINRD' ? 00118000
  118. BP NEWLST BP IF YES, PATCH ONTO THE END. 00119000
  119. LR 3,1 IF NOT, NEW 'FSTFINRD', 00120000
  120. B LR41 AND NEW 'LSTFINRD' PER BELOW CODE. 00121000
  121. * 00122000
  122. NEWLST ST 1,0(,4) PATCH ONTO END OF PREVIOUS LAST BLOCK, 00123000
  123. LR41 LR 4,1 NEW 'LSTFINRD' 00124000
  124. STM34 STM 3,4,FSTFINRD STORE UPDATED 'FSTFINRD' & 'LSTFINRD' 00125000
  125. EXIT LR 14,13 RESTORE RETURN REGISTER 00126000
  126. SR 15,15 CLEAR ERROR FLAGS 00127000
  127. BR 14 RETURN TO SVCINT 00128000
  128. * 00129000
  129. MVMSG MVC 6(0,1),0(4) 'EX' MOVE 00130000
  130. SPACE 2 00131000
  131. KT OI MSGFLAGS,NOTYPING TURN ON NO TYPING FLAG 00132000
  132. B EXIT 00133000
  133. RT NI MSGFLAGS,255-NOTYPING TURN OFF NO TYPING FLAG 00134000
  134. B EXIT 00135000
  135. PARMERR LA R15,3 RETURN UNKNOWN COMMAND @VA00951 00135100
  136. OI MISFLAGS,NEGITS SET FLAG TO GO TO CP @VA06021 00135150
  137. LNR R15,R15 ... @VA00951 00135200
  138. BR R14 ... @VA00951 00135300
  139. SPACE 3 00136000
  140. DS 0F @VA02167 00136300
  141. CAPSMSK DC CL4' ' CONVERT LOWER TO UPPER CASE @VA02167 00136600
  142. LTORG 00137000
  143. EJECT 00138000
  144. NUCON 00139000
  145. REGEQU 00140000
  146. END 00141000