Accelerator Manual (G06.24+, H06.03+)
Preparing Your Program for TNS/R Systems
Accelerator Manual—527303-002
2-9
Segment Wrapping
Examples
The following examples show addressing operations that might not wrap back on the
segment on TNS/R systems as they do on TNS systems.
STRUCT s(*);
BEGIN
INT i;
INT(32) d;
INT j;
END;
PROC exam;
BEGIN
INT .p (s);
STRUCT s2(s);
@p := -1; ! -1 = 65535 (unsigned), structure starts at
! the last word of the user data segment and
! goes past the end
s2 ':=' p FOR $LEN(s2) BYTES; ! On TNS/R systems,
p.d := %h12345678%d; ! these operations
p.j := 6; ! might wrap or trap
ENF;
The structure defined by P starts near the end of the user data segment and goes past
the end. On TNS systems, this addressing operation wraps back to G[0], as shown by
the dotted line in the following figure. On TNS/R systems, this addressing operation
might wrap or trap.
P
G [0]
G [65535]
SG [0]
User Data Segment
(Relative Segment 0)
System Data Segment
(Relative Segment 1)
VST0202.vdd