# What's the +1 means in CLC FOUR,SIX+1 ?

Author Message
jackzhang75

Active User

Joined: 09 Jun 2014
Posts: 121
Location: CT

Posted: Tue May 19, 2015 2:02 am

Hi ,

I am looking at following program.

 Code: ONE      DC     C'ABCDE' TWO      DC     C'12345' THREE    DC     C'ABX1239' FOUR     DC     C'ABC' FIVE     DC     C'123' SIX      DC     C' ABCD' SEVEN    DC     C'BBC'

The DC statements shown above result in the following data (shown in character and hex) in storage:

A B C D E 1 2 3 4 5 A B X 1 2 3 9 A B C 1 2 3 A B C D B B C

C1C2C3C4C5F1F2F3F4F5C1C2E7F1F2F3F9C1C2C3F1F2F340C1C2C3C4C2C2C3

ONE TWO THREE FOUR FIVE SIX SEVEN

Why SIX+1 is C1C2C3 in following instruction ? What does +1 means ?
 Code: CLC FOUR,SIX+1

Thanks
steve-myers

Active Member

Joined: 30 Nov 2013
Posts: 879
Location: The Universe

Posted: Tue May 19, 2015 3:06 am

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.
steve-myers

Active Member

Joined: 30 Nov 2013
Posts: 879
Location: The Universe

Posted: Tue May 19, 2015 5:01 am

 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.
 View Bookmarks All times are GMT + 6 Hours

 Topic Forum Replies Similar Topics Licensed Materials & Restricted M... General Talk & Fun Stuff 10 Null Indicator value -2 means in Embe... DB2 2 Securely storing ftp password in acf2... CA Products 1 What Does "OC" Instruction ... PL/I & Assembler 7 What does % in file discription of EA... CA Products 3
Search our Forums: