View previous topic :: View next topic
|
Author |
Message |
KS
New User
Joined: 28 Feb 2006 Posts: 91 Location: Chennai
|
|
|
|
Hi all,
What is AMODE and RMODE in COBOL? What does 24 or 31 mean to it?
Thanks,
KS |
|
Back to top |
|
|
KS
New User
Joined: 28 Feb 2006 Posts: 91 Location: Chennai
|
|
|
|
Hi all,
Could get info on this :
AMODE - Addressing Mode/Access Mode
AMODE(24) indicates 24-bit (three-byte) addressing - memory below the line.
AMODE(31) indicates 31-bit addressing - memory above and below the line.
AMODE=ANY indicates the program may use either of the addressing technique.
RMODE - Run Mode/Residency Mode
RMODE(24) indicates that the program must be loaded into memory below the line
RMODE(31) indicates that the program can be loaded either below or above the line.
RMODE=ANY indicates that the program can be run in either 24 bit (below)or 31 bit memory(above).
Can anybody explain what is meant by above or below the line ?
Thanks,
KS |
|
Back to top |
|
|
mallikiran
New User
Joined: 07 Sep 2005 Posts: 49
|
|
|
|
"The Line" is the 16 MB line. With 24-bit address, i.e. AMODE = 24, the program will be loaded below the 16MB line, i.e. an address when added to the load module size of the program will be less than 16 MB.
Above the line is where AMODE=31. By specifying AMODE=31 and RMODE=ANY, you are giving the OS the freedom to load the program anywhere, either below or above the 16MB line.
Significance of 16MB:
Nothing but 24 '1' in binary format. That is the maximum value that can be stored in a 24-bit (3 byte) area.
With AMODE = 31, the maximum address value will be 2 GB (31 '1' in binary format).
COBOL programs when compiled get translated into assembler first and then the assembler program is compiled to generate the load. Assembler uses something called registers to access memory locations. Each register is 4 bytes long (32-bits). In AMODE=24, only the first 3 bytes of the register are used for addressing. In AMODE=31, all 4 bytes except the leftmost is used for addressing. The extreme left byte is the sign bit.
Now this is conventional 32-bit machines. In 64-bit machines, the size of the register is 8 bytes. But so far, 64-bit OS still allows the programs to be loaded with AMODE=31.
Hope this helps. |
|
Back to top |
|
|
Ganesh Kalam Warnings : 1 New User
Joined: 11 Aug 2005 Posts: 45 Location: India
|
|
|
|
But where should we specify these parameters. In the program ? |
|
Back to top |
|
|
raak
Active User
Joined: 23 May 2006 Posts: 166 Location: chennai
|
|
|
|
no.. these should be specified ( RMODE and AMODE) in the compiler.. |
|
Back to top |
|
|
shaktiprasad
New User
Joined: 20 Aug 2006 Posts: 34 Location: chennai
|
|
|
|
Hi ,
I have some doubts here.Can anybody tell me
1) How do any body know what mode to provide in compiler options
2) Is there any valid combination which we should use for AMODE and RMODE values. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Can anybody tell me |
No one should even try. . .
You need to talk with your seniors and/or the technical support people and learn what is the standard on your system. Whatever it is, you need to follow the site-specific standard(s). |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
mallikiran wrote: |
In AMODE=31, all 4 bytes except the leftmost is used for addressing. The extreme left byte is the sign bit. |
Hi mallikiran,
a small clarification....
You mentioned the leftmost byte as sign bit. I was thinking it to be an indicator which tells...
0 - 24 bit addressing
1 - 31 bit addressing
Guess the leftmost bit is used as a sign bit, when registers have some numerical value.
Please do correct me if I am wrong... |
|
Back to top |
|
|
|