Guardian Application Conversion Guide
General-Case Variances
Converting to TNS/R Systems
096047 Tandem Computers Incorporated 9–7
Data Swap File Size On all TNS/R systems, the amount of memory allotted to a process for user data is
rounded up to the nearest multiple of 4 KB. Additionally, on D20 TNS/R systems, the
data swap file for the process requires 16 disk pages (32 KB) beyond this amount.
For example, if you call the PROCESS_CREATE_ procedure on a TNS system and
specify a value of 3 for the
memory-pages
parameter, 6 KB of memory would be
allotted to the new process for user data and 6 KB of disk space would be required for
the data swap file. But on a D20 TNS/R system, the amount of memory allotted to the
new process would be rounded up to 8 KB while an additional 32 KB of disk space
would be required for the swap file, making the size of the swap file 40 KB.
When creating a process on a TNS/R system, if you specify the name of an existing
disk file as the data swap file, you must ensure that the file has sufficient disk space
allocated to satisfy these requirements.
Passing the Addresses of
P-Relative Objects
Do not pass the address of a P-relative object to other routines in programs larger than
one TNS code segment. Programs access the wrong object or an address fault occurs if
you pass a:
16-bit address on TNS systems
16-bit address on TNS/R systems
32-bit extended address on TNS systems
However, if you pass a 32-bit extended address on TNS/R systems, programs access
the specified object and continue execution. This is a program error that TNS/R
systems do not detect.
Do not write programs that rely on this feature. There is one supported exception to
this restriction: you can pass user code addresses into user library, system code, or
system library routines.
Look for statements that pass a 32-bit extended address of a P-relative object to other
routines. Recode statements that pass a 32-bit extended address of a P-relative object
to other routines.
Shift Instructions With
Dynamic Shift Counts
The implementation of TNS instructions for signed arithmetic and unsigned logical
shifts with dynamic shift counts differs between TNS and TNS/R systems. This
difference applies to both single-word (16-bit) and double-word (32-bit) shift
instructions.
For single-word shift operations with dynamic shift counts:
TNS systems accept counts within the range of 0 to 255. Shift counts of 16 to 255
are treated as 16.
TNS/R systems counts within the range of 0 to 31. Shift counts of 16 to 31 are
treated as 16. Shift counts greater than 31 give undefined results.