User Tools

Site Tools


ibm:vm370-lib:dumpscan:dmmint.assemble_src

DMMINT Source

References

Source Listing

DMMINT.ASSEMBLE.txt
  1. INT TITLE 'DMMINT (IPCS) VM/370 - RELEASE 6' 00001000
  2. * 00002000
  3. * MODULE NAME: DMMINT 00003000
  4. * 00004000
  5. * 00005000
  6. * FUNCTION: TRANSLATE BINARY DATA TO PRINTABLE FORMAT 00006000
  7. * 00007000
  8. * 00008000
  9. * ATTRIBUTES: REUSABLE 00009000
  10. * NON-REENTRANT 00010000
  11. * 00011000
  12. * 00012000
  13. * ENTRY POINTS: DMMINT 00013000
  14. * 00014000
  15. * 00015000
  16. * ENTRY CONDITIONS: R3 CONTAINS BYTE COUNT, R4 POINTS TO 00016000
  17. * LEFTMOST BYTE OF INPUT STRING. 00017000
  18. * 00018000
  19. * 00019000
  20. * EXIT CONDITIONS: R5 POINTS TO TRANSLATED DATA 00020000
  21. * 00021000
  22. * 00022000
  23. * CALLS TO OTHER ROUTINES: NONE 00023000
  24. * 00024000
  25. * 00025000
  26. * EXTERNAL REFERENCES: NONE 00026000
  27. * 00027000
  28. * 00028000
  29. * TABLES/WORKAREAS: 00029000
  30. * 00030000
  31. * 00031000
  32. * REGISTER USAGE: R15 BASE 00032000
  33. * R14 RETURN 00033000
  34. * R13 CALLER'S SAVEAREA 00034000
  35. * R6 - R9 WORK 00035000
  36. * R5 OUTPUT DATA ADDRESS 00036000
  37. * R4 INPUT DATA ADDRESS 00037000
  38. * R3 INPUT BYTE COUNT 00038000
  39. * 00039000
  40. * 00040000
  41. * NOTES: A 200 BYTE PATCH AREA EXISTS AT LABEL 'PATCH' 00041000
  42. * 00042000
  43. * 00043000
  44. * OPERATION: THE INPUT DATA IS OPERATED ON 1 BYTE AT A TIME 00044000
  45. * PRODUCING 2 OUTPUT BYTES PER 1 INPUT BYTE (2 HEX DIGITS PER 00045000
  46. * BYTE).THE TOTAL OUTPUT RESULT IS THEN TRANSLATED TO EBCDIC. 00046000
  47. * 00047000
  48. * 00048000
  49. * ERROR MESSAGES: NONE 00049000
  50. * 00050000
  51. * 00051000
  52. DMMINT CSECT @VA04250 00052000
  53. STM R14,R12,12(R13) SAVE CALLERS REGS @VA04250 00053000
  54. LR R12,R15 LOAD BASE @VA04250 00054000
  55. USING DMMINT,R12 TEMPORARY ADDRESSABILITY @VA04250 00055000
  56. ST R13,SAVEBACK CALLERS REG PTR @VA04250 00056000
  57. B EYECATCH BRANCH AROUND EYECATCHER @VA04250 00057000
  58. DS 0D @VA04250 00058000
  59. MODNAME DC C'DMMINT ' MODULE NAME @VA04250 00059000
  60. RELLEV DC C'REL4LEV0' RELEASE AND LEVEL @V4075A1 00060000
  61. EYECATCH LA R13,SAVEAREA POINT TO OUR SAVE @VA04250 00061000
  62. *************************************************************** 00062000
  63. * SET UP 00063000
  64. *************************************************************** 00064000
  65. XC RETCODE,RETCODE CLEAR RETURN CODE @VA04250 00065000
  66. XC OUTPUT,OUTPUT SET OUTPUT TO BINARY ZERO @VA04250 00066000
  67. SR R2,R2 CLEAR WORK FOR IC @VA04250 00067000
  68. LR R5,R3 GET LENGTH OF DATA TO BE XLATED @VA04250 00068000
  69. C R5,MAX64 VALID DATA LENGTH? @VA04250 00069000
  70. BNH ZEROCHEK YES @VA04250 00070000
  71. L R5,MAX64 NO, USE MAX ALLOWED (64) @VA04250 00071000
  72. ZEROCHEK LTR R5,R5 TEST FOR ZERO @VA04250 00072000
  73. BNZ CONTINUE NOT ZERO - OK @VA04250 00073000
  74. LA R5,DEFAULT DEFAULT TO 4 @VA04250 00074000
  75. CONTINUE ST R5,INCOUNT SAVE IT @VA04250 00075000
  76. LA R3,OUTPUT POINT TO OUTPUT AREA @VA04250 00076000
  77. LOOP IC R2,0(R4) NEXT INPUT BYTE @VA04250 00077000
  78. SRL R2,4 ISOLATE 1ST 4 BITS (1 HEX DIGIT) @VA04250 00078000
  79. STC R2,0(R3) PUT IT IN OUTPUT @VA04250 00079000
  80. MVN 1(1,R3),0(R4) MOVE SECOND 4 BITS TO NEXT BYTE @VA04250 00080000
  81. LA R3,TWO(R3) UP OUTPUT POINTER 2 BYTES @VA04250 00081000
  82. LA R4,ONE(R4) UP INPUT POINTER 1 BYTE @VA04250 00082000
  83. BCT R5,LOOP SET UP ALL OUTPUT @VA04250 00083000
  84. *************************************************************** 00084000
  85. * THE OUTPUT AREA NOW HAS ALL THE INPUT DATA. 00085000
  86. * E.G. X'1234' ON INPUT NOW IS X'01020304' IN THE OUTPUT AREA 00086000
  87. * WE NEED TO TRANSLATE THIS TO X'F1F2F3F4' AND WE ARE DONE. 00087000
  88. *************************************************************** 00088000
  89. L R5,INCOUNT GET LENGTH OF DATA AGAIN @VA04250 00089000
  90. SLL R5,1 MULTIPLY BY 2 (2 HEX DIGITS/BYTE)@VA04250 00090000
  91. BCTR R5,0 SET UP FOR EXECUTE INSTRUCTION @VA04250 00091000
  92. EX R5,TRNSLATE TRANSLATE THE DATA TO EBCDIC @VA04250 00092000
  93. RETURN L R13,SAVEBACK GET CALLERS SAVE @VA04250 00093000
  94. MVC 16(L'RETCODE,R13),RETCODE PLUG RETURN CODE @VA04250 00094000
  95. LA R2,OUTPUT RETURN RESULTS TO CALLER @VA04250 00095000
  96. ST R2,40(R13) PLUG ADDRESS OF DATA @VA04250 00096000
  97. LM R14,R12,12(R13) RESTORE CALLER'S REGS @VA04250 00097000
  98. BR R14 RETURN TO CALLER @VA04250 00098000
  99. TRNSLATE TR OUTPUT(0),TRTABLE EXECUTED TRANSLATE INSTRCTN @VA04250 00099000
  100. *************************************************************** 00100000
  101. * CONSTANTS SAVEAREAS AND EQUATES 00101000
  102. *************************************************************** 00102000
  103. RETCODE DS F RETURN CODE @VA04250 00103000
  104. * * * * * * * * ------- -------- -------- ------- * 00104000
  105. * * * * * * * * SAVEAREA 00105000
  106. * * * * * * * * ------- -------- -------- ------- * 00106000
  107. SAVEAREA DS 0F THIS PROGRAM'S SAVE AREA @VA04250 00107000
  108. SAVEUSR DS F USER WORD @VA04250 00108000
  109. SAVEFWD DS F FORWARD POINTER @VA04250 00109000
  110. SAVEBACK DS F BACKWARD POINTER @VA04250 00110000
  111. SAVER14 DS F SAVE AREA FOR CALLER'S R14 @VA04250 00111000
  112. SAVER15 DS F SAVE AREA FOR CALLER'S R15 @VA04250 00112000
  113. SAVER0 DS F SAVE AREA FOR CALLER'S R0 @VA04250 00113000
  114. SAVER1 DS F SAVE AREA FOR CALLER'S R1 @VA04250 00114000
  115. SAVER2 DS F SAVE AREA FOR CALLER'S R2 @VA04250 00115000
  116. SAVER3 DS F SAVE AREA FOR CALLER'S R3 @VA04250 00116000
  117. SAVER4 DS F SAVE AREA FOR CALLER'S R4 @VA04250 00117000
  118. SAVER5 DS F SAVE AREA FOR CALLER'S R5 @VA04250 00118000
  119. SAVER6 DS F SAVE AREA FOR CALLER'S R6 @VA04250 00119000
  120. SAVER7 DS F SAVE AREA FOR CALLER'S R7 @VA04250 00120000
  121. SAVER8 DS F SAVE AREA FOR CALLER'S R8 @VA04250 00121000
  122. SAVER9 DS F SAVE AREA FOR CALLER'S R9 @VA04250 00122000
  123. SAVER10 DS F SAVE AREA FOR CALLER'S R10 @VA04250 00123000
  124. SAVER11 DS F SAVE AREA FOR CALLER'S R11 @VA04250 00124000
  125. SAVER12 DS F SAVE AREA FOR CALLER'S R12 @VA04250 00125000
  126. * * * * * * * * ------- -------- -------- ------- * 00126000
  127. MAX64 DC F'64' MAXIMUM VALID TRANSLATION REQUEST@VA04250 00127000
  128. OUTPUT DS CL128 OUTPUT AREA FOR TRANSLATED DATA @VA04250 00128000
  129. INCOUNT DS F STORE FOR INPUT LENGTH @VA04250 00129000
  130. TRTABLE DC C'0123456789ABCDEF' HEX TO CHAR HEX XLATE TABLE @VA04250 00130000
  131. ONE EQU 1 BUMP PTR @VA04250 00131000
  132. TWO EQU 2 BUMP PTR @VA04250 00132000
  133. DEFAULT EQU 4 DEFAULT LENGTH @VA04250 00133000
  134. PATCH DC 50F'0' PATCH AREA @VA04250 00134000
  135. LTORG @VA04250 00135000
  136. REGEQU @VA04250 00136000
  137. END 00137000
ibm/vm370-lib/dumpscan/dmmint.assemble_src.txt ยท Last modified: 2023/08/06 13:37 by Site Administrator