ASMPROG START 0
PRINT GEN
STM 14,12,12(13)
BALR 12,0
USING *,12
ST 13,SAVE+4
LA 13,SAVE
SR 3,3
SR 7,7
SR 2,2
SR 6,6
L 3,X
L 7,Y
MR 2,7
ST 2,Y
ABEND 666,DUMP,REASON=1
L 13,SAVE+4
LM 14,12,12(13)
SR 15,15
BR 14
SAVE DS 18F
X DC F'2'
Y DC F'3'
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
Quote:
i cant find the result of 2*3=6 on log
Because you have not coded anything that would put the result on the log. You would need more code to make printable and WTO to output to log.
Quote:
how can i see the final content of registers and x,y on log?
Again, you would need more code to make these printable and WTO to output to log.
You can see the values in the dump you have produced, assuming you have a SYSUDUMP in JCL.
Find the 'registers at entry' to abend. R2 will have the result of the calculation =6 . R3 will have 2 and R7 will have 3. Calculating the addresses of variables X and Y, you can see that Y has been changed to 6.
This little piece of code will print the content of a register. In that example, a relative programm-adress is stored in register-03. This value is displayed via WTO command.
Code:
translation-table
HEXTABLE_DMP DC CL16'0123456789ABCDEF'
MSG_ROUTPG_PADR DS CL08 printable value
MSG_ROUTPG_RADR DS 001D relative adress
ST R3,MSG_ROUTPG_RADR
UNPK MSG_ROUTPG_PADR+00(07),MSG_ROUTPG_RADR+01(04)
MVC MSG_ROUTPG_PADR+06(02),=C' '
TR MSG_ROUTPG_PADR+00(06),HEXTABLE_DMP-240
LA R3,MSG_ROUTPG_PADR