Amode & Rmode
Amode & Rmode
Amode & Rmode
sxdasgu
2010
Introduction
AMODE refers to the Addressing Mode i.e. and RMODE refers to the Residency
Mode.
RMODE attribute indicates where in virtual storage your program can reside. Valid
AMODE and RMODE specifications are:
RMODE(24) Indicates that the module must reside in virtual storage below 16MB.
You can specify RMODE(24) for 31-bit programs that have 24-bit
dependencies.
RMODE(ANY) Indicates that the module can reside anywhere in virtual storage.
Significance of 16MB:
AMODE = 24 is 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.
Source: http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/index.jsp?
topic=/com.ibm.cics.ts31.doc/dfhp3/dfhp3om.htm
http://ibmmainframes.com/about10564.html