Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6968
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
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
No new posts retrieving envelope information out o... VintageReceiver TSO/ISPF 6 Thu Aug 10, 2017 8:13 pm
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts IP Address of workstation martin9 CICS 3 Fri Jun 23, 2017 7:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us