TNS/E Native Application Conversion Guide

Converting Programs With Guardian API Calls
TNS/E Native Application Conversion Guide529659-003
10-4
CURRENTSPACE
CURRENTSPACE
The CURRENTSPACE procedure returns the ENV register (as saved in the stack
marker) and the space ID of the caller. Native processes do not have the same register
and space ID architecture as TNS processes. Remove calls to CURRENTSPACE from
your program. If your program’s logic relies on TNS process architecture, significant
recoding of your application to support native process architecture is required.
FORMATDATA
The FORMATDATA procedure converts data item values between internal and external
representations. The FORMATDATA procedure requires that all its reference
parameters be 16-bit addresses. The native architecture does not support 16-bit
addresses. Replace calls to FORMATDATA procedure with calls the FORMATDATAX
procedure. The FORMATDATAX procedure requires that all of its reference parameters
be 32-bit addresses. For details, see the
Guardian Procedure Calls Reference Manual
.
LASTADDR
The LASTADDR procedure returns the ‘G’[0] relative address of the last word in the
application process data area. Native processes do not support G-relative addressing.
Replace calls to the LASTADDR procedure with calls to the ADDRESS_DELIMIT_
procedure. For details, see the
Guardian Procedure Calls Reference Manual
.
LASTADDRX
The LASTADDRX procedure allows user programs to check stack limits or parameter
addresses. LASTADDRX returns the last extended address available in the specified
relative segment. Replace calls to the LASTADDR procedure with calls to the
ADDRESS_DELIMIT_ procedure. For details, see the
Guardian Procedure Calls
Reference Manual
.
XBNDSTEST
The XBNDSTEST procedure enables programs to check stack limits and parameter
addresses. To check parameter addresses, replace calls to the XBNDSTEST
procedure with calls to the REFPARAM_BOUNDSCHECK_ procedure. The
REFPARAM_BOUNDSCHECK_ procedure checks the validity of parameter addresses
passed to the procedure that calls it. Primarily, it verifies that a specified memory area
is valid for a specified type of access, such as read only or read/write. For details, see
the
Guardian Procedure Calls Reference Manual
.