User Tools

Site Tools


ibm:vm370-lib:cp:dmktrm.assemble_src

DMKTRM Source

References

Source Listing

DMKTRM.ASSEMBLE.txt
  1. TRM TITLE 'DMKTRM (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 00002000
  3. *. 00003000
  4. * MODULE NAME - 00004000
  5. * 00005000
  6. * DMKTRM 00006000
  7. * 00007000
  8. * FUNCTION - 00008000
  9. * 00009000
  10. * TO IDENTIFY A 2741 TERMINAL AS EITHER 2741P (PTTC/EBCD) 00010000
  11. * OR 2741C ("CORRESPONDENCE") FROM THE FIRST USER COMMAND. 00011000
  12. * 00012000
  13. * ATTRIBUTES - 00013000
  14. * 00014000
  15. * REENTRANT, PAGEABLE, CALLED VIA SVC 00015000
  16. * 00016000
  17. * ENTRY POINTS - 00017000
  18. * 00018000
  19. * DMKTRMID 00019000
  20. * 00020000
  21. * ENTRY CONDITIONS - 00021000
  22. * 00022000
  23. * GPR 0 = BYTE-COUNT OF INPUT LINE 00023000
  24. * GPR 1 = ADDRESS OF TERMINAL INPUT LINE 00024000
  25. * GPR 8 = ADDRESS OF TERMINAL RDEVBLOK 00025000
  26. * GPR 11 = ADDRESS OF USER'S VMBLOK 00026000
  27. * GPR 12 = MODULE BASE REGISTER 00027000
  28. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00028000
  29. * 00029000
  30. * EXIT CONDITIONS - 00030000
  31. * 00031000
  32. * RDEVTYPE (IN RDEVBLOK) SET TO 'TYP2741P' OR 'TYP2741C' 00032000
  33. * AND FLAG RDEVIDNT TURNED ON IF TERMINAL WAS SUCCESSFULLY 00033000
  34. * IDENTIFIED. 00034000
  35. * 00035000
  36. * CALLS TO OTHER ROUTINES - 00036000
  37. * 00037000
  38. * NONE 00038000
  39. * 00039000
  40. * EXTERNAL REFERENCES - 00040000
  41. * 00041000
  42. * NONE 00042000
  43. * 00043000
  44. * TABLES / WORK AREAS - 00044000
  45. * 00045000
  46. * RDEVBLOK 00046000
  47. EJECT 00047000
  48. * REGISTER USAGE - 00048000
  49. * 00049000
  50. * GPR 1 = ADDRESS OF FIRST NON-BLANK WORD IN USER COMMAND 00050000
  51. * GPR 8 = ADDRESS OF TERMINAL RDEVBLOK 00051000
  52. * GPR 12 = BASE REGISTER 00052000
  53. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00053000
  54. * 00054000
  55. * GPR 0, 2, 3, 4, 5 = WORK REGISTERS 00055000
  56. * 00056000
  57. * GPR 6-7, 9-11, 14-14 ARE NOT USED 00057000
  58. * 00058000
  59. * NOTES - 00059000
  60. * 00060000
  61. * NONE 00061000
  62. * 00062000
  63. * OPERATION - 00063000
  64. * 00064000
  65. * 1. GIVEN RAW INPUT LINE VIA R0-R1, SCANS FOR FIRST NONBLANK 00065000
  66. * CHARACTER STRING. (ERROR RETURN IF NOT FOUND). 00066000
  67. * 00067000
  68. * 2. DETERMINES NUMBER OF BYTES (LESS 1) IN NONBLANK STRING 00068000
  69. * (ERROR RETURN IF THERE WERE MORE THAN 8 BYTES). 00069000
  70. * OR'S IN HEX 80'S TO TREAT AS UPPER CASE. 00070000
  71. * 00071000
  72. * 3. CHECKS NUMBER OF BYTES INPUTTED AGAINST A LIMITED NUMBER 00072000
  73. * OF RESERVED-WORDS FOR LEGITIMATE "FIRST COMMAND" 00073000
  74. * (REFER TO TABLE AT LABEL FIRST1 FOR A COMPLETE LIST) 00074000
  75. * FOR 2741P (PTTC/EBCD) TERMINAL. 00075000
  76. * 00076000
  77. * 4. IF STEP 3 FAILS, REPEATS TEST FOR 2741C 00077000
  78. * ("CORRESPONDENCE") TERMINAL. 00078000
  79. * 00079000
  80. * 5. IF STEP 3 OR 4 SUCCEEDED, STORES RDEVTYPE OF 00080000
  81. * "TYP2741P" OR "TYP2741C" IN TERMINAL RDEVBLOK, 00081000
  82. * AND EXITS TO CALLER. 00082000
  83. * 00083000
  84. * 6. IF ALL TESTS FAIL (OR CHARACTER STRING MISSING OR 00084000
  85. * MORE THAN 8 BYTES) EXIT TO CALLER. 00085000
  86. * 00086000
  87. *. 00087000
  88. EJECT @V4075A0 00087100
  89. COPY OPTIONS @V4075A0 00087200
  90. EJECT @V4075A0 00087300
  91. EJECT 00088000
  92. *********************************************************************** 00089000
  93. * 00090000
  94. * DMKTRMID 00091000
  95. * 00092000
  96. *********************************************************************** 00093000
  97. SPACE 00094000
  98. DMKTRM CSECT 00095000
  99. SPACE 00096000
  100. USING PSA,R0 00097000
  101. USING RDEVBLOK,R8 00098000
  102. USING SAVEAREA,R13 00099000
  103. SPACE 00100000
  104. DC CL8'DMKTRM' MODULE IDENTIFIER. 00101000
  105. SPACE 00102000
  106. DMKTRMID RELOC 00103000
  107. SWITCH MAKE SURE WE ARE ON THE IO PROCESSOR @V4075A0 00103100
  108. LTR R0,R0 INPUT COUNT MUST BE .GE. ONE 00104000
  109. BNP TRMEXIT IF NOT, LEAVE 00105000
  110. LA R3,1 R3 = 1 (FOR 'AR' & 'SR' USE) 00106000
  111. TRM1ST CLI 0(R1),BLNK SCAN FOR FIRST NON-BLANK CHARACTER 00107000
  112. BE BLANKFND THIS ONE'S A BLANK @VA03612 00108000
  113. CLI 0(R1),BLANK COULD IT BE AN UPPER CASE BLANK? @VA03612 00109000
  114. BNE TRM1STOK NO - GOOD SHOW WHEN NON-BLANK FND@VA03612 00110000
  115. BLANKFND AR R1,R3 ADVANCE TO NEXT CHARACTER @VA03612 00111000
  116. BCT R0,TRM1ST ITERATE TILL WE FIND IT. 00112000
  117. B TRMEXIT BAD NEWS IF NOTHING THERE - EXIT 00113000
  118. TRM1STOK LR R2,R1 START WHERE 1ST BYTE IS 00114000
  119. TRM2ND CLI 1(R2),BLNK NOW SCAN FOR A BLANK CHARACTER 00115000
  120. BE TRM2NDOK GOOD SHOW WHEN BLANK FOUND @VA03612 00116000
  121. CLI 1(R2),BLANK COULD IT BE AN UPPER CASE BLANK? @VA03612 00117000
  122. BE TRM2NDOK YES -- GOOD SHOW @VA03612 00118000
  123. AR R2,R3 ADVANCE TO NEXT BYTE, 00119000
  124. BCT R0,TRM2ND KEEP LOOKING 00120000
  125. SR R2,R3 SUBTRACT ONE IF WE DROPPED THRU BCT 00121000
  126. TRM2NDOK SR R2,R1 LESS WERE WE STARTED = BYTE-COUNT LESS 1 00122000
  127. C R2,F7 MUST BE 7 OR LESS 00123000
  128. BH TRMEXIT IF NOT, USER TYPED IN 9 NON-BLANK CHARS. 00124000
  129. EX R2,EXUPR 'OR' IN 'UPPER CASE' BITS 00125000
  130. LA R0,RDEVPTTC SET FOR 2741P (PTTC/EBCD) 00126000
  131. LA R3,FIRST1 SET FOR BXLE LOOP FOR 2741P 00127000
  132. LA R4,8 ... 00128000
  133. LA R5,LAST1 ... 00129000
  134. TRMLOOP1 EX R2,EXCLC LOOK FOR LEGAL COMMAND 00130000
  135. BE TRMGOOD GOOD SHOW IF WE FOUND IT. 00131000
  136. BXLE R3,R4,TRMLOOP1 KEEP LOOKING THRU TABLE OF COMMANDS. 00132000
  137. * 00133000
  138. LA R0,RDEVCORR IF FAILED, ASSUME CORRESPONDENCE TERMINAL 00134000
  139. LA R3,FIRST2 ... 00135000
  140. LA R5,LAST2 ... 00136000
  141. TRMLOOP2 EX R2,EXCLC LOOK AGAIN FOR LEGAL COMMAND 00137000
  142. BE TRMGOOD GOOD SHOW IF WE'VE GOT IT. 00138000
  143. BXLE R3,R4,TRMLOOP2 KEEP LOOKING. 00139000
  144. B TRMEXIT AND GO EXIT. 00140000
  145. * 00141000
  146. TRMGOOD STC R0,RDEVTMCD STORE SUCCESSFUL TERMINAL CODE 00142000
  147. OI RDEVFLAG,RDEVIDNT INDICATE TERMINAL IS IDENTIFIED 00143000
  148. NI RDEVTFLG,X'FF'-RDEVATOF TURN ON EXCLAIMATION POINT 00144000
  149. * 00145000
  150. TRMEXIT EXIT EXIT TO CALLER. 00146000
  151. * 00147000
  152. EXUPR OC 0(*-*,R1),UBLANKS TO CONVERT TO 'UPPER CASE' 00148000
  153. EXCLC CLC 0(*-*,R1),0(R3) COMPARE WITH KNOWN LEGAL COMMANDS 00149000
  154. EJECT 00150000
  155. * LEGITIMATE "FIRST COMMAND" FOR 2741P (PTTC/EBCD) TERMINALS: 00151000
  156. SPACE 00152000
  157. FIRST1 DS 0D 00153000
  158. DC AL1(L),AL1(O),AL1(G),AL1(I),AL1(N),3X'00' LOGIN 00154000
  159. DC AL1(L),AL1(O),AL1(G),AL1(O),AL1(N),3X'00' LOGON 00155000
  160. DC AL1(D),AL1(I),AL1(A),AL1(L),4X'00' DIAL 00156000
  161. DC AL1(D),AL1(I),AL1(S),AL1(C),AL1(O),AL1(N),AL1(N),X'00' *00157000
  162. DISCONN 00158000
  163. DC AL1(M),AL1(S),AL1(G),5X'00' MSG 00159000
  164. DC AL1(M),AL1(E),AL1(S),AL1(S),AL1(A),AL1(G),AL1(E),X'00' *00160000
  165. MESSAGE 00161000
  166. DC AL1(H),AL1(E),AL1(L),AL1(P),4X'00' HELP 00162000
  167. DC AL1(L),AL1(O),AL1(G),AL1(O),AL1(U),AL1(T),2X'00' LOGOUT 00163000
  168. DC AL1(L),AL1(O),AL1(G),AL1(O),AL1(F),AL1(F),2X'00' LOGOFF 00164000
  169. DC AL1(S),AL1(L),AL1(E),AL1(E),AL1(P),3X'00' SLEEP 00165000
  170. DC AL1(C),AL1(P),6X'00' CP 00166000
  171. DC AL1(@ASTRSK),7X'00' * 00167000
  172. LAST1 EQU *-8 00168000
  173. SPACE 2 00169000
  174. * LEGITIMATE "FIRST COMMAND" FOR 2741C ("CORRESPONDENCE") TERMINALS: 00170000
  175. SPACE 00171000
  176. FIRST2 DS 0D 00172000
  177. DC AL1(LL),AL1(OO),AL1(GG),AL1(II),AL1(NN),3X'00' 00173000
  178. DC AL1(LL),AL1(OO),AL1(GG),AL1(OO),AL1(NN),3X'00' 00174000
  179. DC AL1(DD),AL1(II),AL1(AA),AL1(LL),4X'00' 00175000
  180. DC AL1(DD),AL1(II),AL1(SS),AL1(CC$),AL1(OO),AL1(NN),AL1(NN)*00176000
  181. ,X'00' 00177000
  182. DC AL1(MM),AL1(SS),AL1(GG),5X'00' 00178000
  183. DC AL1(MM),AL1(EE),AL1(SS),AL1(SS),AL1(AA),AL1(GG),AL1(EE),*00179000
  184. X'00' @VA02313 00180000
  185. DC AL1(HH),AL1(EE),AL1(LL),AL1(PP),4X'00' 00181000
  186. DC AL1(LL),AL1(OO),AL1(GG),AL1(OO),AL1(UU),AL1(TT),2X'00' 00182000
  187. DC AL1(LL),AL1(OO),AL1(GG),AL1(OO),AL1(FF),AL1(FF),2X'00' 00183000
  188. DC AL1(SS),AL1(LL),AL1(EE),AL1(EE),AL1(PP),3X'00' 00184000
  189. DC AL1(CC$),AL1(PP),6X'00' @VA02313 00185000
  190. DC AL1(@@ASTRSK),7X'00' 00186000
  191. LAST2 EQU *-8 00187000
  192. SPACE 2 00188000
  193. UBLANKS DC 8AL1(X'80') 00189000
  194. EJECT 00190000
  195. * HEX EQUIVALENTS OF "RAW" UPPER CASE CHARACTERS 00191000
  196. * FOR 2741P (PTTC/EBCD) TERMINAL: 00192000
  197. * 00193000
  198. A EQU X'E2' 00194000
  199. B EQU X'E4' 00195000
  200. C EQU X'E7' 00196000
  201. D EQU X'E8' 00197000
  202. E EQU X'EB' 00198000
  203. F EQU X'ED' 00199000
  204. G EQU X'EE' 00200000
  205. H EQU X'F0' 00201000
  206. I EQU X'F3' 00202000
  207. J EQU X'C3' 00203000
  208. K EQU X'C5' 00204000
  209. L EQU X'C6' 00205000
  210. M EQU X'C9' 00206000
  211. N EQU X'CA' 00207000
  212. O EQU X'CC' 00208000
  213. P EQU X'CF' 00209000
  214. Q EQU X'D1' 00210000
  215. R EQU X'D2' 00211000
  216. S EQU X'A5' 00212000
  217. T EQU X'A6' 00213000
  218. U EQU X'A9' 00214000
  219. V EQU X'AA' 00215000
  220. W EQU X'AC' 00216000
  221. X EQU X'AF' 00217000
  222. Y EQU X'B1' 00218000
  223. Z EQU X'B2' 00219000
  224. @ASTRSK EQU X'90' 00220000
  225. EJECT 00221000
  226. * HEX EQUIVALENTS OF "RAW" UPPER CASE CHARACTERS 00222000
  227. * FOR 2741C ("ATS" = "CORRESPONDENCE") TERMINAL: 00223000
  228. * 00224000
  229. AA EQU X'CF' 00225000
  230. BB EQU X'B7' 00226000
  231. CC$ EQU X'AF' CC$ (CAN'T USE "CC" OR "CCC") 00227000
  232. DD EQU X'AA' 00228000
  233. EE EQU X'A9' 00229000
  234. FF EQU X'E7' 00230000
  235. GG EQU X'E2' 00231000
  236. HH EQU X'B2' 00232000
  237. II EQU X'CC' 00233000
  238. JJ EQU X'E1' 00234000
  239. KK EQU X'AC' 00235000
  240. LL EQU X'B1' 00236000
  241. MM EQU X'C3' 00237000
  242. NN EQU X'A5' 00238000
  243. OO EQU X'D1' 00239000
  244. PP EQU X'E8' 00240000
  245. QQ EQU X'ED' 00241000
  246. RR EQU X'CA' 00242000
  247. SS EQU X'D2' 00243000
  248. TT EQU X'A0' 00244000
  249. UU EQU X'A6' 00245000
  250. VV EQU X'C6' 00246000
  251. WW EQU X'D7' 00247000
  252. XX EQU X'A3' 00248000
  253. YY EQU X'F3' 00249000
  254. ZZ EQU X'95' 00250000
  255. @@ASTRSK EQU X'8E' 00251000
  256. * 00252000
  257. BLNK EQU X'01' LOWER-CASE BLANK 00253000
  258. BLANK EQU X'81' UPPER-CASE BLANK 00254000
  259. EJECT 00255000
  260. COPY RBLOKS 00256000
  261. COPY SAVE 00257000
  262. COPY DEVTYPES 00258000
  263. COPY EQU 00259000
  264. PSA 00260000
  265. END 00261000
ibm/vm370-lib/cp/dmktrm.assemble_src.txt ยท Last modified: 2023/08/06 13:37 by Site Administrator