Using Compaq COBOL in the Alpha Common Language Environment
13.2 The OpenVMS Alpha Calling Standard (OpenVMS)
Table 13–1 (Cont.) OpenVMS Alpha Register Usage (OpenVMS)
Register
Use
F0,F1
Function value return registers for floating-point values (F1 is used if
floating-point data exceeds 8 bytes)
F2-F9
Conventional saved registers for floating-point values
F10-F15
Conventional scratch registers for floating-point values
F16-F21
Argument registers for floating-point values (one per argument,
additional arguments are placed on the stack)
F22-F30
Conventional scratch registers
F31
Read As Zero/Sink (RZ) register
A stack is a LIFO (last-in/first-out) temporary storage area that the system
allocates for every user process. The system keeps information about each
routine call in the current image on the call stack. Then, each time you call a
routine, the system creates a structure on the stack, defined as a stack frame
and further discussed in the OpenVMS Calling Standard and the OpenVMS
Programming Interfaces: Calling a System Routine.
13.2.2 Return of the Function Value
A function is a routine that returns a single value to the calling routine. The
function value represents the return value that is assigned to the function’s
identifier during execution. According to the OpenVMS Calling Standard, a
function value may be returned as either an actual value or a condition value
that indicates success or failure.
13.2.3 The Argument List
You can use an argument list to pass information to a routine and receive results.
The OpenVMS Calling Standard defines a data structure called an argument
list as an argument item sequence, consisting of the first six arguments
occupying six integer and six floating-point registers (R16-R21 and F16-F21), with
additional argument placed on the stack. The argument information is contained
in R25 (AI register). The stack pointer is contained in R30.
For detailed information, see the OpenVMS Calling Standard.
13.3 OpenVMS Alpha System Routines (OpenVMS)
System routines are OpenVMS Alpha routines that perform common tasks,
such as finding the square root of a number or allocating virtual memory. You
can call any system routine from your program, provided that Compaq COBOL
supports the data structures required to call the routine.
The system routines used most often are OpenVMS Alpha Run-Time Library
routines and system services. System routines are documented in detail in
the OpenVMS RTL Library (LIB$) Manual and the OpenVMS System Services
Reference Manual.
Using Compaq COBOL in the Alpha Common Language Environment 13–3
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......