I need a urgent help, I want to display the register values in JESMSGLG using WTO. I tried a couple of ways it does not work. Can you please share a code snippet to do this??
Scenario, I am using a Java code call JNI (Code) , and the C calls the ASM which linked with it as a DLL. Now the address information is passed from Java to C properly , I also displayed the address just before the call to ASM, it is good, but when it hits my ASM module, it fails in the first load instruction. Note that this is running under the ZLINUX jvm, so I cannot do SOC1 to see them. I dont trust what JVM is showing.
All i want to do is to display the content of the register using a WTO.. Need it urgently!!
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
The mechanics are not too terribly difficult, but
What is the AMODE?
What about the remainder of the environment? Does register 13 point to a register save area? Can I do a GETMAIN to obtain storage?
Code:
SHOWREG1 RSECT Define program CSECT
SHOWREG1 AMODE ANY Define program AMODE
SHOWREG1 RMODE ANY Define program RMODE
USING *,3 Establish program addressability
USING WA,4 Establish work area addressability
SAVE (14,4),,* Save registers
LR 2,1 Copy register 1 to register 2
LR 3,15 Establish program base register
LA 0,WASIZE Load length of the work area
GETMAIN RU,LV=(0) Allocate storage for the work area
LR 4,1 Copy work area address to reg 4
ST 2,REG1 Save original reg 1
MVC WTOBUF,MASTWTO Copy message base to the work area
IC 0,RESULT+L'RESULT Load byte following the result
UNPK RESULT(9),REG1(5) Convert reg 1 to
NC RESULT,=8X'0F' hexadecimal
TR RESULT,HEXTAB digits
STC 0,RESULT+L'RESULT Restore data damaged by the UNPK
WTO MF=(E,WTOBUF) Write the message
LA 0,WASIZE Load length of the work area
FREEMAIN RU,LV=(0),A=(4) Free the work area
RETURN (14,4),T,RC=0 Restore registers & return
MASTWTO WTO 'R1 = XXXXXXXX',MF=L,ROUTCDE=11,DESC=7
MASTWTOL EQU *-MASTWTO
DC 0D'0'
HEXTAB DC C'0123456789ABCDEF'
LTORG ,
DC 0D'0'
WA DSECT
REG1 DS F
WTOBUF DS XL(MASTWTOL)
ORG WTOBUF+4
DS C'R1 = '
RESULT DS CL8' '
ORG ,
DS 0D
WASIZE EQU *-WA
END SHOWREG1
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
sudarshan.srivathsav wrote:
Hi Guys,
I need a urgent help, I want to display the register values in JESMSGLG using WTO. I tried a couple of ways it does not work. Can you please share a code snippet to do this??
Scenario, I am using a Java code call JNI (Code) , and the C calls the ASM which linked with it as a DLL. Now the address information is passed from Java to C properly , I also displayed the address just before the call to ASM, it is good, but when it hits my ASM module, it fails in the first load instruction. Note that this is running under the ZLINUX jvm, so I cannot do SOC1 to see them. I dont trust what JVM is showing.
All i want to do is to display the content of the register using a WTO.. Need it urgently!!
Sorry, I didn't think about this when I prepared my example.
The intent of an OS/360 style WTO is to send a message to the operator's console. Is there anything like this in z/Linux?
z/Linux is Ascii. My little program assumed EBCDIC.
I don't think there is much z/Linux expertise here. Good luck.