Joined: 30 Nov 2013 Posts: 917 Location: The Universe
Remember what Base/Displacement means.
In
CLC FOUR,SIX+1
FOUR effectively tells the hardware to compute the address in storage where FOUR is located. SIX effectively tells the hardware to compute the address in storage where SIX is located, and then add 1 to that address.
Now, if you apply what I told you in the last paragraph, you should be able to figure out what the CLC is doing. Don't forget that CLC uses a length, which the Assembler also determined and inserted into the instruction.
Code:
000004 05C0 4 BALR 12,0
000006 5 USING *,12
000006 D502 C008 C00C 0000E 00012 6 CLC FOUR,SIX+1
00000C 0500 7 BALR 0,0
...
00000E C1C2C3 8 FOUR DC C'ABC'
000011 40C1C2C3C4 9 SIX DC C' ABCD'
The rest you can figure out all by yourself. I don't know about the other responders, but I'm tired of telling you all the answers, and most likely doing your homework for you. You tell us, for a change.
Not only that, open up your Principles of Operation and you tell us what is in the first 4 bits of register 0 after the BALR 0,0 executes if the machine is running in AMODE 24.
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
steve-myers wrote:
Not only that, open up your Principles of Operation and you tell us what is in the first 4 bits of register 0 after the BALR 0,0 executes if the machine is running in AMODE 24.
Sorry. As worded this is a "trick" question in z/Architecture systems, and that was not my intent when I devised the question. By "first 4 bits" I meant bits 32 through 35 of the 64 bit register where bit 0 is the high order bit. This is the common meaning of bits 0 through 3 of the 32 bit register in System/360 through ESA/390 systems. Regardless of the system, the data in the bits is the same.