Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
jackzhang75

Active User

Joined: 09 Jun 2014
Posts: 120
Location: CT

Posted: Tue May 19, 2015 2:02 am    Post subject: What's the +1 means in CLC FOUR,SIX+1 ?

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: 860
Location: The Universe

Posted: Tue May 19, 2015 3:06 am    Post subject:

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: 860
Location: The Universe

Posted: Tue May 19, 2015 5:01 am    Post subject:

 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.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Licensed Materials & Restricted M... vasanthz General Talk & Fun Stuff 10 Wed Aug 08, 2018 12:52 am Null Indicator value -2 means in Embe... deepak_shrivastava DB2 2 Wed Jan 06, 2016 10:27 pm Securely storing ftp password in acf2... harisukumaran CA Products 1 Fri Sep 26, 2014 5:15 am What Does "OC" Instruction ... enrico-sorichetti PL/I & Assembler 7 Tue Apr 17, 2012 12:52 pm What does % in file discription of EA... phani.mf2011 CA Products 3 Thu Apr 28, 2011 3:39 pm

 © 2003-2020 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us