Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 106
Location: windsor

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

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
Back to top
View user's profile Send private message

steve-myers

Active User


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

PostPosted: Tue May 19, 2015 3:06 am    Post subject:
Reply with quote

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.
Back to top
View user's profile Send private message
steve-myers

Active User


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

PostPosted: Tue May 19, 2015 5:01 am    Post subject:
Reply with quote

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.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Null Indicator value -2 means in Embe... deepak_shrivastava DB2 2 Wed Jan 06, 2016 10:27 pm
No new posts Securely storing ftp password in acf2... harisukumaran CA Products 1 Fri Sep 26, 2014 5:15 am
No new posts What Does "OC" Instruction ... enrico-sorichetti PL/I & Assembler 7 Tue Apr 17, 2012 12:52 pm
No new posts What does % in file discription of EA... phani.mf2011 CA Products 3 Thu Apr 28, 2011 3:39 pm
No new posts What means PIC -(8)9 ? Gopalakrishnan V COBOL Programming 4 Fri Mar 18, 2011 3:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us