if You look at the assembler listing ( the expansion of the instruction )
You will understand better what we are trying to tell You
Help with Assembler code
-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: Help with Assembler code
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: Help with Assembler code
NO! When assembled, the code that is to be executed for the TM 0(R5),X'00') is X'91005000' -- 91 is the op code, 00 is the test byte, 5 is the register and 000 is the offset from the register. The X'91' is stored at location XXXXBITS, the X'00' at XXXXBITS+1, and the X'5000' at XXXXBITS+2 and +3. So if you change XXXXBITS+1, then you change -- during execution of the program -- the TM from looking at X'00' to whatever you changed the byte to.I havent understood this completely.Is it that X'00' and XXXXBITS+1 point to the same storage location ?
-
- Posts: 71
- Joined: Sat Jul 23, 2016 8:52 am
- Skillset: cobol,jcl,db2
- Referer: google
Re: Help with Assembler code
Thanks Robert..That clarified my doubts.
-
- Global moderator
- Posts: 2105
- Joined: Thu Jun 03, 2010 6:21 pm
- Skillset: Assembler, JCL, utilities
- Referer: zos.efglobe.com
Re: Help with Assembler code
No no, and no.ramkumar1992sp wrote:Thanks Steve.
I see the instruction is modified using Register RB before the TM instruction is executed.This isn't a new program.It looks like it was written in 1972.
When the TM instruction is executed,aren't we checking the contents of RB register against the mask bits of zeroes.How is the value of XXXXBITS affecting it ?Code: Select all
LA RC,XXXXBITS
---
---
NEWMEET MVC XXXXBITS+1(1),1(RB)
-----
----
---
XXXXBITS TM 0(R5),X'00'
BC 5,SETCONFL
Thanks,
Ram Kumar
When the TM instruction is executed,aren't we checking the contents of RB register against the mask bits of zeroes.How is the value of XXXXBITS affecting it ?
Register 5 is an address. 0(5) directs the machine to compute an address by adding 0 to the contents of register 5. The contents of the mask in the instruction are then used to test the contents of the storage location specified by the address.
LA RC,XXXXBITS
If register C is the program base register, as is often, though by no means always, true, the instruction is corrupting the register. The net effect is oops,
MVC XXXXBITS+1(1),1(RB)
If this instruction is actually in your program and executed, the X'00' in the TM instruction is altered with the contents of a byte in storage whose address is computed by adding 1 to the contents of register B. This was poor programming in 1972, and is still poor programming.
You really need to hire someone who actually knows Assembler to correct your program. Trying to correct it using these forums will more likely than not foul it up worse. Me? I will not add to the confusion any more!
-
- Similar Topics
- Replies
- Views
- Last post
-
-
how to decompress DB2 SMF records in assembler program
by chaat » Fri Feb 19, 2021 9:53 am » in Assembler - 3
- 3485
-
by willy jensen
View the latest post
Sun Feb 21, 2021 4:26 pm
-
-
-
Assembler program accessing IMS DB Database
by gschhatwal1176 » Sat Aug 08, 2020 12:34 pm » in Assembler - 5
- 10625
-
by NicC
View the latest post
Sun Aug 09, 2020 2:53 am
-
-
- 0
- 3139
-
by enrico-sorichetti
View the latest post
Fri Apr 01, 2022 6:00 pm
-
- 1
- 3864
-
by NicC
View the latest post
Tue Sep 15, 2020 5:37 pm
-
- 4
- 9293
-
by grasshopper
View the latest post
Mon Jul 26, 2021 9:17 am