View previous topic :: View next topic
|
Author |
Message |
BhavaniV
New User
Joined: 23 Aug 2010 Posts: 5 Location: Chennai
|
|
|
|
Hi,
Could anyone tell us what would be the output for the following in Assembler:
LA R5,10(R0,R0)
LA R5,10(R0)
LA R5,10(R0,R2) where content in R2 is ‘1000’
LA R13, SAVEAREA where SAVEAREA is the Label |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
In an LA instruction, (as well as an LH, L and others), R0 is never considered as an index-register and is considered as a value of 0. It would be the same as if you coded -
After this instruction, R5 should contain the value which was in R0 plus 10.
If you issue -
Should yield the same results in R5.
Remember, R0 usage (in certain instructions) can result in unexpected results.
What have you tried?
Bill |
|
Back to top |
|
|
BhavaniV
New User
Joined: 23 Aug 2010 Posts: 5 Location: Chennai
|
|
|
|
Thank you Bill.
We are now trying to learn assembler for a project.
Ok for the first and the third, the register R0 is used as index register and is considered 0.
So the Answer for the fist and third query would be
R5 holds the 10 + 0 + Contents in R0
R5 holds 10 + 0 + 1000
What would be the output for this : LA R5,10(R0)
Thanks in Advance for your help.
Regards,
Bhavani V. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
the manual ==> z/Architecture - Principles of Operation
doc number ==> SA22-7832-08
will tell all You want to know about machine instructions
08 is the latest version, for basic/common instruction any version will be enough
for assembler instructions or better directives(*) look at the appropriate manuals for the version of the assembler used
(*) I used both terms in order to make everybody happy |
|
Back to top |
|
|
BhavaniV
New User
Joined: 23 Aug 2010 Posts: 5 Location: Chennai
|
|
|
|
Thanks a lot Enrico.
The links are really very useful and we have got the answer for our question as well.
Regards,
Bhavani V. |
|
Back to top |
|
|
|