Object Code Accelerator Manual
Preparing Your Program for TNS/E Systems
Object Code Accelerator Manual—528144-003
2-7
Nonprivileged References to System Global Data
•
16-bit address on TNS/E systems
•
32-bit extended address on TNS systems
However, if you pass a 32-bit extended address on TNS/E systems, programs access
the specified object and continue execution. This is a program error that TNS/E
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.
Detection Guidelines
•
Look for statements that pass a 32-bit extended address of a P-relative object to
other routines.
•
Run your program on a TNS system. If the program runs correctly, your code is
correct.
Required Change
•
Recode statements that pass a 32-bit extended address of a P-relative object to
other routines.
Nonprivileged References to System Global Data
Only privileged programs can access system global data. When a nonprivileged
program references system global data, results differ depending on the system:
•
On TNS systems, the program accesses the user global data segment, G, instead.
•
On TNS/E systems, the program fails with an Instruction Failure exception.
Detection Guidelines
•
Use a text editor to search for ‘SG” in programs to locate potential variances.
•
TNS/E systems terminate nonprivileged references to SG with an Instruction
Failure exception.
Required Change
•
Remove references to SG variables from nonprivileged programs.
Example
The following TAL procedure tries to use the system value at address SG[0], but on a
TNS system, the procedure uses whatever is at address G[0] in the user data