Table of Contents

DMMHEX Source

References

Source Listing

DMMHEX.ASSEMBLE.txt
  1. HEX TITLE 'DMMHEX (IPCS) VM/370 - RELEASE 6' 00001000
  2. * 00002000
  3. * 00003000
  4. * MODULE NAME: 00004000
  5. * DMMHEX SUBROUTINE OF DUMPSCAN 00005000
  6. * 00006000
  7. * FUNCTION: 00007000
  8. * TRASLATE EBCDIC TO HEX AND CHECK HEX VALIDITY 00008000
  9. * 00009000
  10. * ATTRIBUTES: 00010000
  11. * REUSABLE 00011000
  12. * NON-REENTRANT 00012000
  13. * 00013000
  14. * ENTRY POINTS: 00014000
  15. * DMMHEX 00015000
  16. * 00016000
  17. * ENTRY CONDITIONS: 00017000
  18. * R4 POINTS TO LEFT MOST BYTE OF EBCDIC 00018000
  19. * R3 CONTAINS COUNT IN BYTES 00019000
  20. * 00020000
  21. * EXIT CONDITIONS: 00021000
  22. * R5 POINTS TO LEFTMOST BYTE OF HEX 00022000
  23. * 00023000
  24. * CALLS TO OTHER ROUTINES: 00024000
  25. * 00025000
  26. * 00026000
  27. * EXTERNAL REFERENCES: 00027000
  28. * 00028000
  29. * 00029000
  30. * TABLES/WORKAREAS: 00030000
  31. * 00031000
  32. * 00032000
  33. * REGISTER USAGE: 00033000
  34. * 00034000
  35. * 00035000
  36. * NOTES: 00036000
  37. * 00037000
  38. * 00038000
  39. * OPERATION: 00039000
  40. * 00040000
  41. * 00041000
  42. * ERROR MESSAGES: 00042000
  43. * DMMHEX714I NON-HEX CHARACTER IN INPUT - RETRY 00043000
  44. * 00044000
  45. * 00045000
  46. * * * * * * * *------- -------- -------- -------- ------* 00046000
  47. DMMHEX CSECT @VA04250 00047000
  48. STM R14,R12,SAVEDISP(R13) SAVE CALLERS REGS @VA04250 00048000
  49. LR R12,R15 ADDRESSABILITY @VA04250 00049000
  50. USING DMMHEX,R12 @VA04250 00050000
  51. ST R13,SAVEBACK CALLERS SAVE AREA @VA04250 00051000
  52. B EYECATCH BYPASS EYECATCHER @VA04250 00052000
  53. DS 0D ALIGN @VA04250 00053000
  54. DC CL8'DMMHEX' EYECATCHER @VA04250 00054000
  55. RELLEV DC C'REL4LEV0' RELEASE AND LEVEL @V4075A1 00055000
  56. EYECATCH LA R13,SAVEAREA HEX SAVEAREA @VA04250 00056000
  57. XC RETCODE,RETCODE CLEAR RETURN CODE @VA04250 00057000
  58. * * * * * * * *------- -------- -------- -------- ------* 00058000
  59. * * * * * * * * THIS ROUTINE ACCEPTS IN R4 THE ADDRESS OF 00059000
  60. * * * * * * * * AN ADDRESS LEFT JUSTIFIED IN A PLIST. 00060000
  61. * * * * * * * * IT CHECKS THAT ALL THE CHARACTERS ARE 00061000
  62. * * * * * * * * HEX, AND TRANSLATES THE ADDRESS INTO HEX 00062000
  63. * * * * * * * * AND PASSES IT BACK IN R5. 00063000
  64. * * * * * * * *------- -------- -------- -------- ------* 00064000
  65. ADFETCH LA R2,INL(R4) +7 - LAST BYTE OF ADDRESS @VA04250 00065000
  66. MVC ADDRESS,CZEROS SET ADRESS TO ZEROS @VA04250 00066000
  67. LA R4,PLISTENT COUNT 8 BYTES OF INPUT @VA04250 00067000
  68. LA R3,ADDRESS+LOUT LAST BYTE OF OUTPUT @VA04250 00068000
  69. COMPR CLI 0(R2),BLANK IS IT BLANK @VA04250 00069000
  70. BE BUMP YES - GET NEXT LETTER @VA04250 00070000
  71. MOVEIT CLI 0(R2),A BELOW 'A' @VA04250 00071000
  72. BL BADIN NOT HEX @VA04250 00072000
  73. CLI 0(R2),F ABOVE 'F' @VA04250 00073000
  74. BH HICHEK SO FAR SO GOOD @VA04250 00074000
  75. B VALID GOOD @VA04250 00075000
  76. HICHEK CLI 0(R2),ZERO BELOW '0' @VA04250 00076000
  77. BL BADIN NOT HEX @VA04250 00077000
  78. CLI 0(R2),X9 ABOVE '9' @VA04250 00078000
  79. BH BADIN NOT HEX @VA04250 00079000
  80. VALID MVC 0(CHARL,R3),0(R2) MOVE THE CHAR @VA04250 00080000
  81. BCTR R3,R0 BACK UP OUTPUT PTR @VA04250 00081000
  82. BUMP BCTR R2,R0 BACK UP INPUT PTR @VA04250 00082000
  83. BCT R4,COMPR GET ANOTHER @VA04250 00083000
  84. B TRANADD GOOD - GO TRANSLATE IT @VA04250 00084000
  85. BADIN MVC RETCODE,CODE4 BAD RETURN @VA04250 00085000
  86. LA R8,ERMSG714 ADDRESS @VA04250 00086000
  87. LA R9,L'ERMSG714 AND LENGTH @VA04250 00087000
  88. BAL R10,WRTERM 'NON-HEX CHARACTER IN ADDRESS' @VA04250 00088000
  89. B RETURN TRY AGAIN @VA04250 00089000
  90. * * * * * * * *------- -------- -------- -------- ------* 00090000
  91. * * * * * * * * NOW THE ADDRESS IS RIGHT JUSTIFIED IN THE 00091000
  92. * * * * * * * * 'ADDRESS' FIELD, AND WILL BE TRANSLATED 00092000
  93. * * * * * * * * TO HEX FOR THE GETREC ROUTINE. 00093000
  94. * * * * * * * *------- -------- -------- -------- ------* 00094000
  95. TRANADD LA R4,ADDRESS SET UP FOR CONVERT @VA04250 00095000
  96. LA R6,L'ADDRESS COUNT ADDRESS BYTES @VA04250 00096000
  97. TEST TM 0(R4),NUMZONE NUMERIC? @VA04250 00097000
  98. BNO ADDNINE NO - FIX IT UP @VA04250 00098000
  99. LA R4,ONE(R4) NEXT BYTE @VA04250 00099000
  100. BCT R6,TEST IF NOT ALL DONE @VA04250 00100000
  101. B ALLDONE BUT ON THE OTHER HAND @VA04250 00101000
  102. ADDNINE MVC REGLOAD+LORD(CHARL),0(R4) ADD A BINARY @VA04250 00102000
  103. L R7,REGLOAD NINE TO ANY @VA04250 00103000
  104. AH R7,NINE ALPHA DIGIT @VA04250 00104000
  105. ST R7,REGLOAD PLUG IT BACK INTO ADDRESS @VA04250 00105000
  106. MVC 0(CHARL,R4),REGLOAD+LORD INTO ADDRESS @VA04250 00106000
  107. LA R4,ONE(R4) GET NEXT BYTE @VA04250 00107000
  108. BCT R6,TEST NEXT BYTE @VA04250 00108000
  109. ALLDONE PACK HEXADEC(HEXL),ADDRESS(ADL) STRIP OFF ZONES @VA04250 00109000
  110. B RETURN GET OUT @VA04250 00110000
  111. * * * * * * * * ------- -------- -------- ------- * 00111000
  112. * * * * * * * * WRTERM 00112000
  113. * * * * * * * * ------- -------- -------- ------- * 00113000
  114. WRTERM ST R8,PARMLIS1 SAVE MSG TEXT PTR IN PARM LIST @V4075A2 00114100
  115. ST R9,PARMLIS2 AND TEXT LENGTH @V4075A2 00114200
  116. LA R1,PARMLIS1 POINTER TO PASS @V4075A2 00114300
  117. L R15,FEDLNADD ADDRESS OF DMMFEDLN - LINE WRITER@V4075A2 00114400
  118. BALR R14,R15 GO WRITE THE LINE @V4075A2 00114500
  119. BR R10 AND RETURN @V4075A2 00114600
  120. PARMLIS1 DS F PARM1 @V4075A2 00114700
  121. PARMLIS2 DS F PARM2 @V4075A2 00114800
  122. FEDLNADD DC V(DMMFEDLN) LINE WRITER ROUTINE @V4075A2 00114900
  123. * * * * * * * * ------- -------- -------- ------- * 00116000
  124. * * * * * * * * CLOSE 00117000
  125. * * * * * * * * ------- -------- -------- ------- * 00118000
  126. RETURN L R13,SAVEBACK RESTORE CALLER SAVE PTR @VA04250 00119000
  127. MVC SAVEREG5(L'HEXADEC,R13),HEXADEC PLUG HEX INTO R5@VA04250 00120000
  128. MVC SAVREG15(L'RETCODE,R13),RETCODE PLUG RETCODE @VA04250 00121000
  129. LM R14,R12,SAVEDISP(R13) RESTORE CALLERS REGS @VA04250 00122000
  130. BR R14 RETURN @VA04250 00123000
  131. * * * * * * * * ------- -------- -------- ------- * 00124000
  132. * * * * * * * * CONSTANTS 00125000
  133. * * * * * * * * ------- -------- -------- ------- * 00126000
  134. * * * * * * * * ------- -------- -------- ------- * 00127000
  135. * * * * * * * * SAVEAREA 00128000
  136. * * * * * * * * ------- -------- -------- ------- * 00129000
  137. SAVEAREA DS 0F THIS PROGRAM'S SAVE AREA @VA04250 00130000
  138. SAVEUSR DS F USER WORD @VA04250 00131000
  139. SAVEFWD DS F FORWARD POINTER @VA04250 00132000
  140. SAVEBACK DS F BACKWARD POINTER @VA04250 00133000
  141. SAVER14 DS F SAVE AREA FOR CALLER'S R14 @VA04250 00134000
  142. SAVER15 DS F SAVE AREA FOR CALLER'S R15 @VA04250 00135000
  143. SAVER0 DS F SAVE AREA FOR CALLER'S R0 @VA04250 00136000
  144. SAVER1 DS F SAVE AREA FOR CALLER'S R1 @VA04250 00137000
  145. SAVER2 DS F SAVE AREA FOR CALLER'S R2 @VA04250 00138000
  146. SAVER3 DS F SAVE AREA FOR CALLER'S R3 @VA04250 00139000
  147. SAVER4 DS F SAVE AREA FOR CALLER'S R4 @VA04250 00140000
  148. SAVER5 DS F SAVE AREA FOR CALLER'S R5 @VA04250 00141000
  149. SAVER6 DS F SAVE AREA FOR CALLER'S R6 @VA04250 00142000
  150. SAVER7 DS F SAVE AREA FOR CALLER'S R7 @VA04250 00143000
  151. SAVER8 DS F SAVE AREA FOR CALLER'S R8 @VA04250 00144000
  152. SAVER9 DS F SAVE AREA FOR CALLER'S R9 @VA04250 00145000
  153. SAVER10 DS F SAVE AREA FOR CALLER'S R10 @VA04250 00146000
  154. SAVER11 DS F SAVE AREA FOR CALLER'S R11 @VA04250 00147000
  155. SAVER12 DS F SAVE AREA FOR CALLER'S R12 @VA04250 00148000
  156. * * * * * * * * ------- -------- -------- ------- * 00149000
  157. CODE4 DC F'4' BAD RETURN CODE @VA04250 00150000
  158. SAVHEX DS 18F OUR SAVE AREA @VA04250 00151000
  159. RETCODE DS F RETURN CODE @VA04250 00152000
  160. PADADD DS H OVERFLOW FOR ADDRESS HI ORD @VA04250 00153000
  161. ADDRESS DS CL6 RIGHT ALIGNED ADDRESS @VA04250 00154000
  162. CZEROS DC 6C'0' INITIALIZE ADDRESS @VA04250 00155000
  163. REGLOAD DS F WORK AREA @VA04250 00156000
  164. HEXADEC DS 2F HEX TRANSLATED OUTPUT @VA04250 00157000
  165. NINE DC H'9' ADJUST HEX ALPHA CHAR @VA04250 00158000
  166. ERMSG714 DC C'DMMHEX714I NON-HEX CHARACTER IN INPUT - RETRY' 00159000
  167. BLANK EQU X'40' BLANK TEST @VA04250 00160000
  168. A EQU X'C1' THESE ARE FOR @VA04250 00161000
  169. F EQU X'C6' THE HEX VALIDITY @VA04250 00162000
  170. ZERO EQU X'F0' TESTS MADE ON @VA04250 00163000
  171. X9 EQU X'F9' THE INPUT DATA @VA04250 00164000
  172. NUMZONE EQU X'F0' ZONE FOR A NUMERIC CHAR @VA04250 00165000
  173. CHARL EQU 1 LENGTH OF A SINGLE CHARACTER @VA04250 00166000
  174. ONE EQU 1 BUMP CTR @VA04250 00167000
  175. LORD EQU 3 LO - ORD BYTE @VA04250 00168000
  176. LOUT EQU 5 LENGTH OF OUTPUT @VA04250 00169000
  177. HEXL EQU 5 PACKED ADDRESS @VA04250 00170000
  178. ADL EQU 7 UNPACKED ADDRESS @VA04250 00171000
  179. INL EQU 7 INPUT LENGTH @VA04250 00172000
  180. PLISTENT EQU 8 LENGTH OF A PLIST ENTRY @VA04250 00173000
  181. SAVEDISP EQU 12 REGS IN SAVE AREA @VA04250 00174000
  182. SAVREG15 EQU 16 REG 15 IN SAVE AREA @VA04250 00175000
  183. SAVEREG5 EQU 40 REG 5 IN SAVE AREA @VA04250 00176000
  184. PATCH DC 50F'0' PATCH @VA04250 00177000
  185. LTORG @VA04250 00178000
  186. REGEQU @VA04250 00179000
  187. END 00180000