pTAL Conversion Guide

Hardware Indicators
pTAL Conversion Guide527302-002
20-18
Setting Hardware Indicators in TAL
°
A variable containing indexing, field selection, or bit selection
STRUCT s;
BEGIN
INT f;
END;
INT a[0:9];
INT i;
s.f := i; ! Field selection: condition code is
! not available
a[9] := i; ! Index: condition code not available
i.<3:5> := a; ! Bit Selection: condition code is
! not available
The preceding rules are also described in Table 20-3 on page 20-19.
Example 20-7 on page 20-18 shows assignment statements after which you can test
the condition code (those marked OK), and those after which you cannot test the
condition code (those marked ERROR).
Example 20-7. Testing Condition Code After Assignments (pTAL) (page 1 of 2)
INT m;
PROC p(x, y);
INT x;
INT .y;
BEGIN
INT a[0:9];
INT i;
INT .EXT k;
INT(32) j;
STRING str;
REAL r;
STRUCT s;
BEGIN
INT s1[0:4];
INT s2;
END;
EXTADDR SUBPROC f(x) RETURNSCC;
INT x;
BEGIN
RETURN %200000D, x;
END;
i := k; ! OK: Left and right sides are simple
i := i + 1; ! OK: Left and right sides are simple
x := x + 1; ! OK: Left side is value parameter,
! right side is INT
@k := f(0); ! OK: Left side is pointer cell,
! right side is RETURNSCC function