Accelerator Manual (G06.24+, H06.03+)
Preparing Your Program for TNS/R Systems
Accelerator Manual—527303-002
2-11
Odd-Byte References
their least significant bit set. If your program was written following good TAL 
programming practices, odd-byte references are not a concern.
In TAL, data types stored as doublewords or quadruplewords include INT(32), 
FIXED(n), REAL, REAL(64), and INT(64). In C, data types stored as doublewords or 
quadruplewords include long, unsigned long, long long, float, and double.
You can use the Misalignment Tracing Facility to detect if your programs are using 
misaligned pointers., This tool detects where in the program the misaligned pointers 
are located so you can change the program to avoid misalignment. See Misalignment 
Tracing Facility on page 2-14 for more information.
Odd-byte references to words (2-byte units) result in a compatibility trap. 
Detection Guidelines
•
Look for odd-byte references to doublewords or quadruplewords.
•
Look for uninitialized pointers. Many odd-byte references to doublewords and 
quadruplewords result from uninitialized pointers (previously undetected 
programming errors).
Required Change
•
Remove odd-byte references to doublewords and quadruplewords from your 
programs.
Recommended Changes
•
Use pointer conversions as recommended for the source code language so that 
TNS word instructions are never applied to odd-byte addresses.
•
Set the system’s SCF attribute TNSMISALIGN to either FAIL or NOROUND (see 
Table 2-1, TNS Misalignment Handling Methods, on page 2-16). FAIL can be 
unsafe on production systems, but is recommended on test systems.
•
Remove odd-byte references to words from your programs.
Examples
•
The results of the following program fragment are unpredictable on TNS/R 
systems.
REAL(64) .EXT RPTR;
STRING .EXT SPTR = RPTR; ! Same pointer as RPTR
@SPTR := @SPTR + 1d;
IF SPTR = 'Z' THEN ... ! OK
IF RPTR = 0.0L0 THEN ... ! Results are unpredictable
•
In the following example, an odd-byte address alignment error occurs on a TNS/R 
system because the program illegally references a nil pointer. The extended 










