2 the openvms alpha calling standard (openvms) – Compaq COBOL AAQ2G1FTK User Manual
Page 464
Using Compaq COBOL in the Alpha Common Language Environment
13.1 Routines, Procedures, and Functions
For more information on system routines on OpenVMS Alpha, refer to the
OpenVMS RTL Library (LIB$) Manual and the OpenVMS System Services
Reference Manual.
♦
13.2 The OpenVMS Alpha Calling Standard (OpenVMS)
The OpenVMS Calling Standard and the OpenVMS Programming Interfaces:
Calling a System Routine describe the concepts used by all OpenVMS Alpha
languages for invoking routines and passing data between them. The following
attributes are specified by the OpenVMS Calling Standard:
•
Register usage
•
Stack usage
•
Function value return
•
Argument list
The following sections discuss these attributes in more detail. The OpenVMS
Calling Standard also defines such attributes as the calling sequence,
the argument data types and descriptor formats, condition handling, and
stack unwinding. These attributes are discussed in detail in the OpenVMS
Programming Concepts manual.
13.2.1 Register and Stack Usage
The OpenVMS Alpha architecture provides 32 general purpose integer registers
(R0-R31) and 32 floating-point registers (F0-F31), each 64 bits in length. The
OpenVMS Programming Interfaces: Calling a System Routine defines the use of
these registers, as listed in Table 13–1.
Table 13–1 OpenVMS Alpha Register Usage (OpenVMS)
Register
Use
R0
Function value return register (see also F0, F1)
R1
Conventional scratch register
R2-R15
Conventional saved registers
R16-R21
Argument registers, one register per argument, additional arguments
are placed on the stack
R22-R24
Conventional scratch registers
R25
Argument information (AI); contains argument count and argument
type
R26
Return address (RA) register
R27
Procedure value (PV) register
R28
Volatile scratch register
R29
Frame pointer (FP)
R30
Stack pointer (SP)
R31
Read As Zero/Sink (RZ) register
PC
Program counter
(continued on next page)
13–2 Using Compaq COBOL in the Alpha Common Language Environment