Table of Contents

DMSLN Source

References

Source Listing

DMSLN.MACRO.txt
  1. MACRO 00001000
  2. &NM DMSLN &MF=I, I|L|(E,ADDR)|(E,(REG)) *00002000
  3. &DMSHDR=YES, YES (DMSERR) OR NO (LINEDIT) *00003000
  4. &NUM=*-*, NUM | (REG) *00004000
  5. &NUMA=*-*, ADDR | (REG) *00005000
  6. &LET=*, LETTER | (REG) *00006000
  7. &LETA=*-*, ADDR | (REG) *00007000
  8. &CSECT=*, * | NAME *00008000
  9. &TEXT=, 'MESSAGE-TEXT' *00009000
  10. &TEXTA=*-*, ADDR | (REG) *00010000
  11. &COMP=YES, YES | NO *00011000
  12. &DOT=YES, YES | NO *00012000
  13. &SUB=, (TYPE,VALUE,...) *00013000
  14. &MAXSUBS=0, NUMBER *00014000
  15. &DISP=ERRMSG, ERRMSG|TYPE|SIO|NONE|PRINT|CPCOMM *00015000
  16. &BUFFA=*-*, ADDR | (REG) *00016000
  17. &DIE=NO, YES | NO *00017000
  18. &HALT=NO, YES | NO (SAME AS DIE) *00018000
  19. &RENT=YES, YES | NO *00019000
  20. &TYPCALL=SVC SVC | BALR | SVC202 | NONE 00020000
  21. .* CALLED BY DMSERR AND LINEDIT MACROS TO DO ALL THE WORK. 00021000
  22. GBLA &DMSLNGA FOR INTER-MACRO COMMUNICATION 00022000
  23. LCLA &$DPV,&FLAG1,&FLAG2,&NSUBS,&I 00023000
  24. LCLA &B 00024000
  25. LCLA &LFL,&LTX,&LHD,&LBF,&LSB 00025000
  26. LCLB &TB 00026000
  27. LCLB &$MFI,&$MFL,&$MFE,&$HD,&$MFES 00027000
  28. LCLB &$NM,&$NMA,&$NMR,&$NMAR 00028000
  29. LCLB &$LT,&$LTA,&$LTR,&$LTAR 00029000
  30. LCLB &$TX,&$TXA,&$TXAR,&$CM,&$DT 00030000
  31. LCLB &$SB1,&$SBN,&$BFA,&$BFAR 00031000
  32. LCLB &$DI,&$TPS,&$TPB,&$TP2,&$TPN,&GENR,&$RN 00032000
  33. LCLC &S,&$CS 00033000
  34. &NSUBS SETA N'&SUB 00034000
  35. &NSUBS SETA N'&SUB/2 00035000
  36. AIF (&MAXSUBS LT &NSUBS).NSOK 00036000
  37. &NSUBS SETA &MAXSUBS GET MAX(NSUBS,MAXSUBS) 00037000
  38. .NSOK ANOP 00038000
  39. &$MFI SETB ('&MF' EQ 'I') 00039000
  40. &$MFL SETB ('&MF' EQ 'L') 00040000
  41. &$MFE SETB ('&MF(1)' EQ 'E') 00041000
  42. &$MFES SETB (&$MFE AND '&MF(2)' EQ '''SYS''') 00042000
  43. &B SETA &$MFI+&$MFL+&$MFE 00043000
  44. DMSLNC 1,MF,&B 00044000
  45. AIF (&$MFL).MFL 00045000
  46. DMSLNY &DMSHDR,DMSHDR 00046000
  47. &$HD SETB ('&DMSHDR' EQ 'YES') 00047000
  48. &$NM SETB (('&NUM' NE '*-*') AND &$HD) 00048000
  49. &$NMA SETB (('&NUMA' NE '*-*') AND &$HD) 00049000
  50. &$NMR SETB (('&NUM'(1,1) EQ '(') AND &$HD) 00050000
  51. &$NMAR SETB (('&NUMA'(1,1) EQ '(') AND &$HD) 00051000
  52. &B SETA &$NM+&$NMA 00052000
  53. DMSLNC &$HD,NUM/NUMA,&B 00053000
  54. &$LT SETB (('&LET' NE '*') AND &$HD) 00054000
  55. &$LTA SETB (('&LETA' NE '*-*') AND &$HD) 00055000
  56. &$LTR SETB (('&LET'(1,1) EQ '(') AND &$HD) 00056000
  57. &$LTAR SETB (('&LETA'(1,1) EQ '(') AND &$HD) 00057100
  58. &B SETA &$LT+&$LTA 00058000
  59. DMSLNC &$HD,LET/LETA,&B 00059000
  60. &$TX SETB ('&TEXT' NE '') 00060000
  61. &$TXA SETB ('&TEXTA' NE '*-*') 00061000
  62. &$TXAR SETB ('&TEXTA'(1,1) EQ '(') 00062000
  63. &B SETA &$TX+&$TXA 00063000
  64. DMSLNC 1,TEXT/TEXTA,&B 00064000
  65. DMSLNY &COMP,COMP 00065000
  66. &$CM SETB ('&COMP' EQ 'YES') 00066000
  67. DMSLNY &DOT,DOT 00067000
  68. &$DT SETB ('&DOT' EQ 'YES') 00068000
  69. &$SB1 SETB (N'&SUB EQ 2) 00069000
  70. &$SBN SETB (N'&SUB GT 2) 00070000
  71. DMSLND &DISP 00071000
  72. &$DPV SETA &DMSLNGA SET CODE FOR 'DISP' VALUE 00072000
  73. &$BFA SETB ('&BUFFA' NE '*-*') 00073000
  74. &$BFAR SETB ('&BUFFA'(1,1) EQ '(') 00074000
  75. DMSLNY &DIE,DIE 00075000
  76. DMSLNY &HALT,HALT 00076000
  77. &$DI SETB ('&DIE' EQ 'YES' OR '&HALT' EQ 'YES') 00077000
  78. DMSLNY &RENT,RENT 00078000
  79. &$RN SETB ('&RENT' EQ 'YES') 00079000
  80. &$TPS SETB ('&TYPCALL' EQ 'SVC') 00080000
  81. &$TPB SETB ('&TYPCALL' EQ 'BALR') 00081000
  82. &$TP2 SETB ('&TYPCALL' EQ 'SVC202') 00082000
  83. &$TPN SETB ('&TYPCALL' EQ 'NONE') 00083000
  84. &B SETA &$TPS+&$TPB+&$TP2+&$TPN 00084000
  85. DMSLNC 1,TYPCALL,&B 00085000
  86. &FLAG1 SETA X'80'*((&$MFE+&$TXA+1)/2) 00086000
  87. &FLAG1 SETA &FLAG1+X'40'*&$HD+X'20'*&$BFA+X'10'*&$SB1+X'08'*&$SBN 00087000
  88. &FLAG2 SETA X'80'*&$CM+X'40'*&$DT+X'20'*&$DI+&$DPV 00088000
  89. .* 00089000
  90. .* DETERMINE THE LOCATION OF EACH ITEM IN THE PLIST. 00090000
  91. &LFL SETA 8*&$TP2 BEGINNING OF PLIST 00091000
  92. &LTX SETA &LFL+2 LOCATION OF TEXT ADDRESS 00092000
  93. &LHD SETA &LTX+3*((&$MFE+&$TXA+1)/2) LOCATION OF HEADER INFO 00093000
  94. &LBF SETA &LHD+6*&$HD LOCATION OF 'BUFFA' ADDRESS 00094000
  95. &LSB SETA &LBF+3*&$BFA LOCATION OF SUB LIST 00095000
  96. &S SETC '&SYSNDX' FOR EASIER SUBSTITUTION LATER 00097000
  97. AIF ('&NM' EQ '').NONM 00098000
  98. &NM DS 0H 00099000
  99. .NONM ANOP 00100000
  100. .* 00101000
  101. .* DETERMINE THREE CHARACTER CSECT NAME. 00102000
  102. .* IF LINEDIT CALL, IGNORE THIS ROUTINE. @VA01360 00102100
  103. AIF ('&DMSHDR' EQ 'NO').CSE @VA01360 00102200
  104. &$CS SETC '&CSECT' 00103000
  105. AIF ('&CSECT' NE '*').CSE 00104000
  106. &$CS SETC '&SYSECT'(1,3) FIRST THREE CHARS OF &SYSECT 00105000
  107. AIF ('&$CS' NE 'DMS').CSE BUT DON'T JUST USE 'DMS' 00106000
  108. &$CS SETC '&SYSECT'(4,3) NEXT THREE CHARS OF &SYSECT 00107000
  109. .CSE ANOP 00108000
  110. .* 00109000
  111. .* FOR STANDARD FORM (MF=I) WE GENERATE THE IN-LINE PLIST. 00110000
  112. AIF (NOT &$MFI).NOPL 00111000
  113. DMSLNP &$TP2,CNOP,0,4 00112000
  114. BAL 1,DMSA&S 00113000
  115. DMSLNP &$TP2,DC,CL8'DMSERR' 00114000
  116. DC AL1(&FLAG1,&FLAG2) FLAG BYTES 00115000
  117. &B SETA 1-&$TX 00116000
  118. DMSLNP &B,DC,AL3(&TEXTA) TEXT ADDRESS 00117000
  119. &B SETA &$HD 00118000
  120. DMSLNP &B,DC,AL2(&NUM),CL1'&LET',CL3'&$CS' HEADER 00119000
  121. &B SETA &$BFA 00120000
  122. DMSLNP &B,DC,AL3(&BUFFA) BUFFER ADDRESS 00121000
  123. &B SETA &$SB1 00122000
  124. DMSLNP &B,DC,AL1(DMSC&S) SINGLE SUBSTITUTION CODE 00123000
  125. &B SETA &$SBN 00124000
  126. DMSLNP &B,DC,(&NSUBS)XL5'00' SPACE FOR SUB LIST 00125000
  127. .NOPL ANOP 00126000
  128. .* 00127000
  129. .* FOR EXECUTE, LOAD ADDRESS OF PARAMETER LIST. 00128000
  130. AIF (NOT &$MFE).NOES 00129000
  131. DMSLNP &$MFES,USING,NUCON,0 00130000
  132. DMSLNP &$MFES,L,1,ADMSERL 00131000
  133. &TB SETB ('&MF(2)'(1,1) NE '(') 00132000
  134. &B SETA &TB*(1-&$MFES) 00133000
  135. DMSLNP &B,LA,1,&MF(2) 00134000
  136. &TB SETB (NOT(&TB OR ('&MF(2)' EQ '(1)'))) 00135000
  137. &B SETA &TB 00136000
  138. DMSLNP &B,LR,1,&MF(2) 00137000
  139. &B SETA &$TX 00138000
  140. DMSLNP &B,BAL,15,DMSA&S 00139000
  141. .NOES ANOP 00140000
  142. .* 00141000
  143. .* GENERATE IN-LINE TEXT STRING. 00142000
  144. AIF (NOT &$TX).NOTX 00143000
  145. DMST&S DC AL1(DMSL&S) LENGTH OF MESSAGE TEXT 00144000
  146. &I SETA 1 00145000
  147. .TXLOOP ANOP 00146000
  148. DC C&TEXT(&I) 00147000
  149. &I SETA &I+1 00148000
  150. AIF (&I LE N'&TEXT).TXLOOP 00149000
  151. DMSL&S EQU *-DMST&S-1 TEXT LENGTH 00150000
  152. .NOTX ANOP 00151000
  153. DMSA&S DS 0H 00152000
  154. .* GENERATE FIRST GROUP OF EXECUTE FORM SUBSTITUTIONS (NO REGISTERS 00153000
  155. .* SPECIFIED) 00154000
  156. AIF (NOT &$MFE).NOET 00155000
  157. DMSLNP &$TP2,MVC,0(8,1),=CL8'DMSERR' 00156000
  158. MVI &LFL.(1),&FLAG1 SET FIRST FLAG BYTE 00157000
  159. MVI &LFL+1(1),&FLAG2 SET SECOND FLAG BYTE 00158000
  160. &B SETA &$TXA*(1-&$TXAR) 00159000
  161. DMSLNP &B,LA,15,&TEXTA SET TEXT ADDRESS 00160000
  162. &B SETA &$TX+&$TXA*(1-&$TXAR) 00161000
  163. DMSLNP &B,STCM,15,B'0111',&LTX.(1) 00162000
  164. &B SETA &$NM*(1-&$NMR) 00163000
  165. DMSLNP &B,MVC,&LHD.(2,1),=AL2(&NUM) 00164000
  166. &B SETA &$LT*(1-&$LTR) 00165000
  167. DMSLNP &B,MVI,&LHD+2(1),C'&LET' SET MESSAGE LETTER 00166000
  168. &B SETA &$HD 00167000
  169. DMSLNP &B,MVC,&LHD+3(3,1),=CL3'&$CS' SET CSECT NAME 00168000
  170. &B SETA &$BFA*(1-&$BFAR) 00169000
  171. DMSLNP &B,LA,15,&BUFFA SET BUFFER ADDRESS 00170000
  172. &B SETA &$BFA*(1-&$BFAR) 00171000
  173. DMSLNP &B,STCM,15,B'0111',&LBF.(1) 00172000
  174. &B SETA &$SB1 00173000
  175. DMSLNP &B,MVI,&LSB.(1),DMSC&S 00174000
  176. .NOET ANOP 00175000
  177. .* 00176000
  178. .* THE FOLLOWING GROUP OF SUBSTITUTIONS WILL BE GENERATED FOR 00177000
  179. .* THE EXECUTE FORM, OR FOR THE STANDARD FORM WHEN NON-RE-ENTRANT 00178000
  180. .* CODE IS TO BE GENERATED. 00179000
  181. AIF (&$NMA OR &$NMR OR &$LTA OR &$LTR).NORENT 00180000
  182. AIF (&$BFAR OR &$TXAR OR &$SBN).NORENT 00181000
  183. AGO .RENT 00182000
  184. .NORENT ANOP 00183000
  185. &GENR SETB 1 00184000
  186. AIF (&$MFE OR NOT &$RN).RENT NO WARNING IF EXECUTE FORM 00185000
  187. MNOTE 4,'DMSLN005W NON-RE-ENTRANT CODE WILL BE GENERATED' 00186000
  188. .RENT ANOP 00187000
  189. AIF (NOT &GENR).NOST 00188000
  190. &B SETA &$NMA*(1-&$NMAR) 00189000
  191. DMSLNP &B,MVC,&LHD.(2,1),&NUMA 00190000
  192. &B SETA &$NMR 00191000
  193. DMSLNP &B,STCM,&NUM(1),B'0011',&LHD.(1) 00192000
  194. &B SETA &$NMAR 00193000
  195. DMSLNP &B,MVC,&LHD.(2,1),0(&NUMA(1)) 00194000
  196. &B SETA &$LTA*(1-&$LTAR) 00195000
  197. DMSLNP &B,MVC,&LHD+2(1,1),&LETA 00196000
  198. &B SETA &$LTR 00197000
  199. DMSLNP &B,STC,&LET(1),&LHD+2(1) 00198000
  200. &B SETA &$LTAR 00199000
  201. DMSLNP &B,MVC,&LHD+2(1,1),0(&LETA(1)) 00200000
  202. &B SETA &$TXAR 00201000
  203. DMSLNP &B,STCM,&TEXTA(1),B'0111',&LTX.(1) 00202000
  204. &B SETA &$BFAR 00203000
  205. DMSLNP &B,STCM,&BUFFA(1),B'0111',&LBF.(1) 00204000
  206. .NOST ANOP 00205000
  207. .* 00206000
  208. .* GENERATE CODE FOR ONE SUBSTITUTION 00207000
  209. AIF (NOT &$SB1).NOSB1 00208000
  210. DMSC&S DMSLNU &SUB(1),&SUB(2),1 00209000
  211. .NOSB1 ANOP 00210000
  212. AIF (NOT &$SBN).SBE 00211000
  213. &I SETA 0-1 00212000
  214. &DMSLNGA SETA &LSB LOCATION OF FIRST SUB 00213000
  215. .SBL ANOP 00214000
  216. &I SETA &I+2 POINT TO NEXT SUB PAIR 00215000
  217. AIF (&I GT N'&SUB).SBE 00216000
  218. &TB SETB (&I+1 GE N'&SUB) SET IF THIS IS THE LAST SUB 00217000
  219. DMSLNU &SUB(&I),&SUB(&I+1),&TB 00218000
  220. AGO .SBL 00219000
  221. .SBE ANOP 00220000
  222. .* 00221000
  223. .* GENERATE THE CALL TO DMSERR 00222000
  224. DMSLNP &$TP2,SVC,202 00223000
  225. DMSLNP &$TP2,DC,AL4(*+4) 00224000
  226. DMSLNP &$TPS,SVC,203 00225000
  227. DMSLNP &$TPS,DC,H'-6' 00226000
  228. &B SETA &$TPB 00227000
  229. DMSLNP &B,L,15,=V(DMSERR) 00228000
  230. &B SETA &$TPB 00229000
  231. DMSLNP &B,BALR,14,15 00230000
  232. MEXIT 00231000
  233. .* 00232000
  234. .* GENERATE LIST FORM EXPANSION 00233000
  235. .MFL ANOP 00234000
  236. &I SETA 8+14+5*&NSUBS MAX LENGTH OF PLIST 00235000
  237. &NM DS &I.X 00236000
  238. MEND 00237000