Object Code Accelerator Manual
Preparing Your Program for TNS/E Systems
Object Code Accelerator Manual—528144-003
2-4
Variances in TNS and Accelerated Code
TNS/E, and the dynamic limits on flat segment sizes (due to other nearby segments)
may be different on TNS/R and TNS/E.
Detection Guideline
•
If your programs allocate selectable segments larger than 127.5 MB, or a
combination of flat segments larger than the program's own 31-bit address space
allows, ALLOCATESEGMENT and SEGMENT_ALLOCATE_ return error -2.
Required Change
•
Change your programs to use the new maximum segment size if they allocate
selectable segments larger than 127.5 MB.
•
Flat segments (at addresses other than 0x0008000 .. 0x07FFFFFF) have
performance and size advantages over selectable segments (which must all
timeshare the memory space at 0x0008000.. 0x07FFFFFF). For best performance,
it is recommended (but not required) to convert selectable segments into flat
segments with non-overlapping addresses, and eliminate the associated expensive
frequent calls to USESEGMENT or SEGMENT_USE_. This is also recommended
(but not required) for native-mode programs.
Variances in TNS and Accelerated Code
This section describes the variances between TNS and TNS/E systems that apply to
TNS object code and accelerated object code. The majority of these variances affect
programs with user-written trap handlers or TAL programs with CODE statements.
Additionally, these variances point out program bugs that can be detected on one
system type and not on another. Check your programs for variances in:
•
Trap handlers that use the register stack
•
Trap handlers that use the P register
•
Reserved instructions
•
Passing the address of P-relative objects
•
Nonprivileged references to system global data
•
Stack wrapping
•
Odd-byte references
•
Shift instructions with dynamic shift counts
Trap Handlers That Use the Register Stack
During program execution, the trap mechanism handles all error and exception
conditions not related to input or output. User-written trap handlers differ on TNS and