What is AMODE 24 and 31 And RMODE?

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Nikhil Nigam
New Member
Posts: 5
Joined: Sat May 21, 2016 7:24 am

What is AMODE 24 and 31 And RMODE?

Post by Nikhil Nigam »

Hi,

What is AMODE 24 and 31 And RMODE? Could someone please explain in simple terms.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1905
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa

Re: What is AMODE 24 and 31 And RMODE?

Post by Robert Sample »

AMODE is addressing mode, or how many bytes of memory can be addressed
RMODE is residency mode, or where the load module is loaded into memory

The original S/360 in 1964 used 24 bits (out of the 32 bits in the word) for addressing.  This allows 16,777,216 bytes of memory to be addressed.  AMODE 24 uses the 24 bit form of addressing.  Eventually, IBM determined they needed more memory addressing, so they allowed 31 bits of the 32 bits in the word to be used for addressing.  This allows over 2 billion bytes to be addressed.  AMODE 31 uses the 31 bit form of addressing. If a program uses 24-bit addressing, anything above the 16,777,216th byte of memory cannot be accessed.

In recent years, 2+ billion bytes of memory has not been enough.  IBM went to a 64-bit addressing scheme which allows something like 8 billion 31-bit addresses to be defined and used.  AMODE 64, however, works slightly differently than 24 or 31.
Nikhil Nigam
New Member
Posts: 5
Joined: Sat May 21, 2016 7:24 am

Re: What is AMODE 24 and 31 And RMODE?

Post by Nikhil Nigam »

Robert Sample" wrote: Sat Dec 07, 2024 8:33 am AMODE is addressing mode, or how many bytes of memory can be addressed
RMODE is residency mode, or where the load module is loaded into memory

 
I read that but I didn't get the meaning of it. I mean what if there was no AMODE or it was very less like 8-bit, what exactly would happen? Why is the concept needed? 
User avatar
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 855
Joined: Wed Sep 11, 2013 3:57 pm

Re: What is AMODE 24 and 31 And RMODE?

Post by enrico-sorichetti »

read and meditate on

https://www.redbooks.ibm.com/redbooks/pdfs/sg246366.pdf

most of the questions asked on zOS basics will have an answer there

pretty old but the concepts useful to beginners still applyy to the latest zOS versions
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1905
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa

Re: What is AMODE 24 and 31 And RMODE?

Post by Robert Sample »

I mean what if there was no AMODE or it was very less like 8-bit, what exactly would happen? Why is the concept needed? 
 
Prior to IBM's announcement of 31-bit addressing in 1983, there was no such thing as AMODE or RMODE.  An address was 24 bits -- period.  One thing to keep in mind is that IBM is extremely focused on maintaining compatibility so when they announced 31-bit addressing, they needed to come up with a way to integrate 31-bit addresses into their existing architecture.  AMODE and RMODE was the way IBM did so.  The concept is needed to allow a program to determine what addresses it can access, and to determine where the program can be loaded into memory.  If there was no AMODE, all memory addresses would be a fixed length (24 bits or 31 bits or 64 bits) and the various Assembler instructions would handle only the fixed length addresses.  Since AMODE and RMODE do exist, and have existed since 1983, it is pointless to speculate about them not existing.

Topic locked to prevent any further pointless speculations.
Locked Previous topicNext topic

Return to “IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”