Page 1 of 1

What is AMODE 24 and 31 And RMODE?

Posted: Sat Dec 07, 2024 12:26 am
by Nikhil Nigam
Hi,

What is AMODE 24 and 31 And RMODE? Could someone please explain in simple terms.

Re: What is AMODE 24 and 31 And RMODE?

Posted: Sat Dec 07, 2024 8:33 am
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.

Re: What is AMODE 24 and 31 And RMODE?

Posted: Tue Dec 10, 2024 11:36 am
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? 

Re: What is AMODE 24 and 31 And RMODE?

Posted: Tue Dec 10, 2024 4:08 pm
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

Re: What is AMODE 24 and 31 And RMODE?

Posted: Sat Dec 14, 2024 10:47 pm
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.