Object Code Accelerator Manual
Preparing Your Program for TNS/E Systems
Object Code Accelerator Manual—528144-003
2-6
Reserved Instructions
You can change the P trap variable to a valid restart point such as a cleanup point in 
the outer block, but do not perform arithmetic on P. For example, the results of the 
following operations are undefined:
INT trap_p = 'L' - 2; ! Location of the P register
trap_p := trap_p '+' 1; ! Undefined
trap_p := trap_p '-' 1; ! Undefined
Refer to Trap Handlers That Use the Register Stack on page 2-4 for guidelines on 
writing trap handlers.
Detection Guideline
•
Find trap handlers by looking for calls to the system procedure ARMTRAP with 
parameters (address of label, address of data area). The ARMTRAP procedure 
specifies an entry point into the application program where execution is to begin if 
a trap occurs. You do not need to change ARMTRAP procedures with parameters 
of (-1,-1). These parameters cause programs to abend on traps. Trap handlers are 
usually small enough in both size and number to check visually.
Required Change
•
Change your programs to comply with the preceding restrictions.
Reserved Instructions 
Two TNS instructions previously reserved for the operating system have changed from 
nonprivileged to privileged instructions on TNS/E systems:
TOTQ - Test the Out Queue 
RCPU - Read Cpu Number
These instructions continue to be nonprivileged instructions on existing TNS systems; 
HP reserves the right to change them to privileged instructions.
Detection Guideline
•
Programs that use these instructions in the nonprivileged environment fail with an 
Instruction Failure exception.
Required Change
•
Remove these instructions from nonprivileged programs.
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










