User Tools

Site Tools


ibm:vm370-lib:macro:dmslnz.macro_src

DMSLNZ Source

References

Source Listing

DMSLNZ.MACRO.txt
  1. MACRO 00001000
  2. &N DMSLNZ &T,&LAST,&STATV,&VAL,&STATL,&LEN 00002000
  3. GBLA &DMSLNGA 00003000
  4. LCLA &TCODE,&B 00004000
  5. LCLB &S1,&LOK,&A,&L,&VR,&LR,&TB 00005000
  6. .* THIS MACRO GENERATES A SUBSTITUTION LIST ELEMENT FOR THE DMSLN MACRO 00006000
  7. &S1 SETB ('&N' NE '') ON IF ONLY ONE SUBSTITUTION 00007000
  8. &TCODE SETA 5 THIS WILL BE SUBSTITUTION CODE 00008000
  9. AIF ('&T' EQ 'HEX').HEX 00009000
  10. AIF ('&T' EQ 'HEXA').HEXA 00010000
  11. AIF ('&T' EQ 'DEC').DEC 00011000
  12. AIF ('&T' EQ 'DECA').DECA 00012000
  13. AIF ('&T' EQ 'CHAR').CHAR 00013000
  14. AIF ('&T' EQ 'CHARA').CHARA 00014000
  15. AIF ('&T' EQ 'HEX4A').HEX4A 00015000
  16. AIF ('&T' EQ 'CHAR8A').CHAR8A 00016000
  17. MNOTE 8,'DMSLNZ008E ILLEGAL ''SUB'' CODE ''&T''' 00017000
  18. AGO .HEX4A 00018000
  19. .HEXA ANOP 00019000
  20. &A SETB 1 00020000
  21. .HEX ANOP 00021000
  22. &TCODE SETA 0 00022000
  23. AGO .TE 00023000
  24. .DECA ANOP 00024000
  25. &A SETB 1 00025000
  26. .DEC ANOP 00026000
  27. &TCODE SETA 1 00027000
  28. AGO .TE 00028000
  29. .CHAR ANOP 00029000
  30. MNOTE 4,'DMSLNZ009W WARNING -- ''CHAR'' WAS CHANGED TO ''CHARA*00030000
  31. ''' 00031000
  32. .CHARA ANOP 00032000
  33. &A SETB 1 ADDRESS BIT 00033000
  34. &LOK SETB 1 LENGTH IS OK 00034000
  35. &TCODE SETA 2 00035000
  36. AGO .TE 00036000
  37. .HEX4A ANOP 00037000
  38. &A SETB 1 00038000
  39. &LOK SETB 1 00039000
  40. &TCODE SETA 3 00040000
  41. AGO .TE 00041000
  42. .CHAR8A ANOP 00042000
  43. &A SETB 1 00043000
  44. &LOK SETB 1 00044000
  45. &TCODE SETA 4 00045000
  46. AGO .TE 00046000
  47. .TE ANOP 00047000
  48. &L SETB (&STATL GT 0) WAS LENGTH SPECIFIED? 00048000
  49. AIF (&LOK OR (NOT &L)).LOK LENGTH LEGAL? 00049000
  50. MNOTE 8,'DMSLNZ010E ILLEGAL LENGTH SPECIFIED WITH ''&T'' SUB' 00050000
  51. &L SETB 0 RESET TO IGNORE LENGTH 00051000
  52. .LOK ANOP 00052000
  53. &VR SETB (&STATV EQ 2) (REG) IN VALUE FIELD? 00053000
  54. &LR SETB ((&STATL EQ 2) AND &L) (REG) IN LENGTH FIELD? 00054000
  55. .RE ANOP 00055000
  56. &TCODE SETA &TCODE+X'80'*&LAST+X'40'*&A+X'20'*&L CODE FOR THIS SUB 00056000
  57. .* 00057000
  58. .* GENERATE CODE FOR ONLY ONE SUBSTITUTION. DATA/ADDRESS VALUE GOES 00058000
  59. .* INTO REG 0, WITH LENGTH, IF ANY, IN HIGH BYTE. 00059000
  60. AIF (NOT &S1).NOS1 00060000
  61. &N EQU &TCODE SUBSTITUTION CODE 00061000
  62. AIF (&LR AND (NOT &VR)).S1LRNA 00062000
  63. AIF (&LR AND &VR).S1LRA 00063000
  64. .* DROP THRU IF LENGTH IS NOT IN A REGISTER. 00064000
  65. &B SETA 1-&VR 00065000
  66. DMSLNP &B,LA,0,&VAL 00066000
  67. &B SETA &VR 00067000
  68. DMSLNP &B,LR,0,&VAL 00068000
  69. &B SETA &L 00069000
  70. DMSLNP &B,ICM,0,B'1000',=AL1(&LEN) 00070000
  71. MEXIT 00071000
  72. .* 00072000
  73. .* COME HERE IN CASE OF -ADDRESS,(REG)- 00073000
  74. .S1LRNA ANOP 00074000
  75. LR 0,&LEN GET LENGTH VALUE 00075000
  76. SLL 0,24 SHIFT LENGTH INTO HIGH BYTE 00076000
  77. LA 15,&VAL COMPUTE ADDRESS OF DATA 00077000
  78. OR 0,15 AND PLACE INTO REG 0 00078000
  79. MEXIT 00079000
  80. .* 00080000
  81. .* COME HERE IN CASE OF -(REG),(REG)- 00081000
  82. .S1LRA ANOP 00082000
  83. LR 15,&LEN GET LENGTH VALUE 00083000
  84. SLL 15,24 SHIFT INTO HIGH BYTE 00084000
  85. LR 0,&VAL GET ADDRESS 00085000
  86. N 0,=X'00FFFFFF' ZERO OUT HIGH BYTE 00086000
  87. OR 0,15 OR IN LENGTH 00087000
  88. MEXIT 00088000
  89. .NOS1 ANOP 00089000
  90. .* 00090000
  91. .* COME HERE TO GENERATE CODE TO INSERT INTO SUBSTITUTION LIST 00091000
  92. .* ONE SUBSTITUTION OF MANY. 00092000
  93. MVI &DMSLNGA.(1),&TCODE SET OPTION CODE 00093000
  94. &DMSLNGA SETA &DMSLNGA+1 00094000
  95. &B SETA &L*(1-&LR) 00095000
  96. DMSLNP &B,MVI,&DMSLNGA.(1),&LEN SET LENGTH CODE 00096000
  97. &B SETA &LR 00097000
  98. DMSLNP &B,STC,&LEN,&DMSLNGA.(1) SET LENGTH CODE 00098000
  99. &DMSLNGA SETA &DMSLNGA+&L INCREMENT IF LENGTH INSERTED 00099000
  100. &TB SETB (NOT &A) 00100000
  101. &B SETA 1-&VR 00101000
  102. DMSLNP &B,LA,15,&VAL LOAD NUMBER/ADDRESS VALUE 00102000
  103. &B SETA 1-&VR 00103000
  104. DMSLNP &B,STCM,15,B'&TB.111',&DMSLNGA.(1) STORE VALUE 00104000
  105. &B SETA &VR 00105000
  106. DMSLNP &B,STCM,&VAL,B'&TB.111',&DMSLNGA.(1) STORE NUM/ADDR VA 00106000
  107. &DMSLNGA SETA &DMSLNGA+3+&TB INCR BY LENGTH OF STORED VALUE 00107000
  108. MEND 00108000
ibm/vm370-lib/macro/dmslnz.macro_src.txt ยท Last modified: 2023/08/06 13:38 by Site Administrator