View previous topic :: View next topic
|
Author |
Message |
Pankaj Shrivastava Currently Banned New User
Joined: 24 Jul 2009 Posts: 51 Location: Pune
|
|
|
|
I guess discussion is moving in to CSECT size , and what i said is in context to my problem , wherein I need to find the frees space spared by the base registers.
CSECT size - Area(bytes) my base registers are capable to address. It can go way beyond 4096 if I use more than 1 BR. |
|
Back to top |
|
|
Pankaj Shrivastava Currently Banned New User
Joined: 24 Jul 2009 Posts: 51 Location: Pune
|
|
|
|
I am trying to read the listing of a compiled program in order to find an alternative of knowing the base registers . The program is having one CSECT only . In the following USING map , Registers 3,4,9,12 are for DSECT addressability and Registers 10 and 11 are the base registers declared for the CSECT .
So this CSECT is capable of addr 8192 bytes . Please correct me as I am just guessing and dont know how to decipher the USING map.
Code: |
Using Map
HLASM R5.0 2009/08
--------Using----------------- Reg Max Last Label and Using Text
Value Range Id Disp Stmt
00000000 00001000 FFFFFFFD 3 00036 8121 CURORDER,R03
00000000 00001000 FFFFFFFC 4 004C2 7854 BJ2DSHEZ,R04
00000000 00001000 FFFFFFFF 9 00C7E 7956 COMMAREA,R09
00000FFF 00001000 FFFFFFFF 12 00F3E 8080 COMMAREA+4095,R12
00000000 00001000 00000001 15 00014 5751 *,R15
15 R15
000 Using Map R10
000 4095,R11
Action ----------------Using----------------- Reg
|
|
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
This has been explained already, but a CSECT is just a block of memory that contains code and data. It does not address anything and the number of base registers used in the program has nothing to do with the total size of a CSECT. If you want the size of a CSECT, the USING MAP will not give you anything useful. I think you need to get the terminology correct because now it seems no one can figure out what you are asking. |
|
Back to top |
|
|
Pankaj Shrivastava Currently Banned New User
Joined: 24 Jul 2009 Posts: 51 Location: Pune
|
|
|
|
sorry i asked this question , but still cant understand what was so confusing in the question , Did no body ever find such a situation where a need to find the free space arose . I agree that there are special techniques as pointed by Enrico to address without base registers , But i have been asking right from the begining that my requirement is,given a set of base registers to establish the addresibilty ..is there any convinient way to find the free space .
Anyways thanks all for giving time in the discussion...this surely has given some valauble info ..but not a perfect solution |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
...but not a perfect solution |
why blame others for Your unwillingness to ...
- listen and understand what is being told
- amend Your understanding of addressability and csect size
- learn the proper terminology , nothing as free space in a csect
- learn the basics, for donkey programming the number of base registers needed is csectsize/4096
since the beginning you were told that your question did not make sense.
no reason at all to complain |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Did no body ever find such a situation where a need to find the free space arose |
No one that i've worked with or managed using various assemblers has needed/wanted this. . .
We still don't understand why you believe you need this. . .
Actually, i'm not sure we understand just what you are looking for . . .
Keep in mind that while your question is completely clear and logical to you, it has not been to others. |
|
Back to top |
|
|
milind suman Warnings : 1 New User
Joined: 19 Aug 2009 Posts: 55 Location: Pune
|
|
|
|
If I understand this question correctly , Assuming the question is about the addressability and by free space you mean the space left within USING range with a set of base registers . Keeping apart some exceptional cases as mentioned by the senior members above , Follow these steps to calculate the Bytes you can insert in your program so that not to get the compilation error ' Beyond active using range' :
1) Find your CSECT with type SD, Its length and ID in External symbol dic. of listing :
Code: |
ยป
External Symbol Dictiona
Symbol Type Id Address Length Owner Id Flags Alias-of
PGMXYZ SD 00000001 00000000 00000000 00
ABC SD 00000002 00000000 00000018 00
XYZ SD 00000003 00000018 0000001A 00
|
2) Next , Map the ID number in USING MAP and find the total registers allocated
Code: |
Using Map
HLASM R
-----Using----------------- Reg Max Last Label and
Value Range Id Disp Stmt
00000006 00001000 00000002 3 00010 9 *,3,4
00001006 00001000 00000002 4 00000
0000001E 00001000 00000003 5 00010 22 *,5,6
0000101E 00001000 00000003 6 00000
|
e.g csect xyy - id - 00003 ,length - 1A , base registers 5 nd 6
space = 1000*2 - 1A
This might not be a generic way , and may require some observation in using map . But with your requirement this will help you to reach the conclusion in short cut . |
|
Back to top |
|
|
|