dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 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. |
|
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 . |
|