pTAL Reference Manual (H06.03+)
Hardware Indicators
HP pTAL Reference Manual—523746-005
13-3
Hardware Indicators After Assignments
Hardware Indicators After Assignments
Topics:
•
$OVERFLOW on page 13-3
•
$CARRY on page 13-4
•
Condition Codes on page 13-4
$OVERFLOW
After every assignment statement, the compiler generates code that tests for overflow
if either:
•
Overflow traps are enabled
•
All of the following conditions are true:
°
Overflow traps are disabled.
°
The root operator is one of the following:
°
Negation (unary -), +, -, *, /, '/'
°
$DBL of an INT, FIXED, REAL, or REAL(64) value
°
$DBLR of an INT, FIXED, REAL, or REAL(64) value
°
$FLTR of a REAL(64) value
Example 13-2. ENABLE_OVERFLOW_TRAPS and
DISABLE_OVERFLOW_TRAPS Block Attributes
PROC p;
BEGIN: ENABLE_OVERFLOW_TRAPS ! Enable traps for block
...
END;
PROC q;
BEGIN
SUBPROC q1;
BEGIN: DISABLE_OVERFLOW_TRAPS ! Disable traps for block
...
END;
...
END;
PROC r;
BEGIN: ENABLE_OVERFLOW_TRAPS
CALL p; ! Call p with traps enabled
END;
PROC s;
BEGIN: DISABLE_OVERFLOW_TRAPS
CALL p; ! Call p with traps disabled
END;










