z/OS MVS Programming: Assembler Services Reference ABE-HSP
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Addressing mode (AMODE)

z/OS MVS Programming: Assembler Services Reference ABE-HSP
SA23-1369-00

A program can run in 24-bit, 31-bit, or 64-bit addressing mode. A program that executes in 24-bit or 31-bit addressing mode can invoke most of the services described in this information. A program that executes in 64-bit addressing mode has a smaller group of services that it can invoke.

In general,
  • A program running in 24-bit addressing mode cannot pass parameters or parameter addresses that are higher than 16 megabytes. However, there are exceptions. For example, a program running in 24-bit addressing mode can:
    • Free storage above 16 megabytes using the FREEMAIN macro
    • Allocate storage above 16 megabytes using the GETMAIN macro
    • Use cell pool services for cell pools located in storage above 16 megabytes using the CPOOL macro
    • Use page services for storage locations above 16 megabytes using the PGSER macro
  • A program running in 24-bit or 31-bit addressing mode cannot pass parameter addresses that are higher than 2 gigabytes, unless stated otherwise in the individual service description.
  • If a program running in 31-bit or 64-bit addressing mode issues a service, parameters and parameter addresses can be above or below 16 megabytes, unless otherwise stated in the individual service description.

Some macros can generate code that is appropriate for programs in either 64-bit addressing mode or 24-bit or 31-bit addressing mode. These macros check a global symbol set by the SYSSTATE macro. See Telling the system about the execution environment for more information.

When you call a callable service in 24-bit or 31-bit addressing mode, you must pass 31-bit addresses to the system service regardless of what addressing mode your program is running in. If your program is running in 24-bit mode and you use a callable service, you must set the high-order byte of parameter addresses to zeros.

You can invoke the following services in 64-bit addressing mode, subject to the “SVC or PC” restrictions mentioned later in this topic, but you cannot pass parameters and parameter addresses above 2 gigabytes: ABEND, ATTACHX, CALLDISP, CHAP, CSVQUERY, DELETE, DEQ, DETACH, DOM, DSPSERV, DYNALLOC, ENQ, ESPIE, ESTAEX, EXCP, FREEMAIN, GETMAIN, GTRACE, IARVSERV, IDENTIFY, IEAARR, LINKX, LOAD, MODESET, PGSER, POST, RESERVE, SDUMPX, SETRP, STAX, STIMER, STIMERM, STORAGE, SYNCHX, TIME, TIMEUSED, TTIMER, VRADATA, WAIT, WTO, WTOR, and XCTL.

Before invoking a service in 64-bit addressing mode, you must inform system macros, by specifying SYSSTATE AMODE=64, that you are in 64-bit addressing mode. You can invoke only those options that result in calling the system by an SVC or PC in 64-bit addressing mode. You cannot invoke any option that results in calling the system by a branch-entry in 64-bit addressing mode.

Unless explicitly stated otherwise, assume that a given service cannot be invoked in 64-bit addressing mode and cannot accept parameters and parameter addresses above 2 gigabytes.

For information about 64-bit addressing mode and the 64-bit GPR, see z/OS MVS Programming: Assembler Services Guide.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014