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
 

 

Why single base register address to only 4K?

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

New User


Joined: 19 Feb 2010
Posts: 27
Location: India

PostPosted: Fri May 06, 2011 8:20 am    Post subject: Why single base register address to only 4K?
Reply with quote

Hello,

Single base register can address more than 4K as well. Then why in assembler it can point up to 4K only.

Can anybody help me to get the answer?

Thank you in advance.

-Vijay
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Fri May 06, 2011 10:17 am    Post subject:
Reply with quote

actually, the register only points at 1 bytes.
the offset part of the instruction
allows you to address memory in either direction of the 'byte addressed by the register'.

how many bytes are there in an instruction for the offset?. what is the max positive or negative value that can be represented?
Back to top
View user's profile Send private message
sandeep chopra

New User


Joined: 28 Aug 2008
Posts: 11
Location: Noida

PostPosted: Fri May 06, 2011 12:11 pm    Post subject: Reply to: Why single base register address to only 4K?
Reply with quote

Maximum displacement 12 bits can take is 4095 (FFF). So we need second register if you need to go further for which displacement will start from zero. You will get out of base message if u define a label which is having displacement more than 4095 from starting of program means from where u have given base.
Back to top
View user's profile Send private message
Harsh Pawar

New User


Joined: 04 Jun 2008
Posts: 25
Location: Noida

PostPosted: Tue May 31, 2011 4:59 pm    Post subject:
Reply with quote

Any variable used in assembler program should have addressability.
If you see the instruction format and it is a type of instruction which uses storage then that storage should have addressability.
Example :

MVC is a SS type instruction. For every S (storage) we should have 2 bytes.

BDDD where B = base register (1-F) so it requires 4 bits for B.
DDD = Displacement 4 + 4 + 4 = 12 bits.

So lets say you are using register 12 for your base address , then B= C (C is in hex so in decimal it is 12).

Now what maximum value can DDD = 12 bits address ? 2power 12 = 4096.

This is how we got this 4 K limit for a program.

Please note that you may use multiple base addressability to make a program which is bigger then 4K.

Regards,
Harry
Back to top
View user's profile Send private message
nigelosberry

New User


Joined: 06 Jan 2009
Posts: 88
Location: Ggn, IN

PostPosted: Wed Jun 01, 2011 10:45 am    Post subject: Re: Why single base register address to only 4K?
Reply with quote

It will be better if you try to visualize yourself why only 4096 bytes can be addressed USING a single base register.

To start with, you can have a look at the explicit format of an SS1 type instruction and see what are all the different components assembled in that instruction's object code and what each of them is meant for.

This is one of the very basic questions(and has been asked before a few times). In future please use the "search" option of the forum before putting any new question on board.
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
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts Splitting of single report to seperat... abdulrafi TSO/ISPF 7 Mon Mar 27, 2017 3:59 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm


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