pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
13 Hardware Indicators
Table 56 Hardware Indicators
MeaningRepresentationHardware Indicator
$OVERFLOWOverflow bit
$CARRYCarry bit
Less than< or ‘<’Condition code
Greater than> or ‘>’
Equal= or ‘=’
Less than or equal<= or ‘<=’
Greater than or equal>= or ‘>=’
Not equal<> or ‘<>’
In TNS architecture, a “hardware indicator” is one of three fields of the environment (ENV) register.
Topics:
• Managing Overflow Traps (page 234)
• Hardware Indicators After Assignments (page 236)
• Hardware Indicators in Conditional Expressions (page 239)
• Nesting Condition Code Tests (page 242)
• Using Hardware Indicators Across Procedures (page 244)
Managing Overflow Traps
pTAL provides a “static T flag” with which you specify whether traps are enabled or disabled at
any point in your program. You manipulate the static T flag with:
CommentScopeDirective or Attribute
OVERFLOW_TRAPS is the defaultCompilation unitOVERFLOW_TRAPS
Overrides the [NO]OVERFLOW_TRAPS
directive
Procedure or subprocedure[NO]OVERFLOW_TRAPS Procedure
Attribute
Overrides both the
[NO]OVERFLOW_TRAPS directive and
Block[EN|DIS]ABLE_OVERFLOW_TRAPS
Block Attribute
the [NO]OVERFLOW_TRAPS procedure
attribute
The directives and attributes active when a pTAL statement is compiled determine the overflow
trapping state of the code that the compiler generates for that statement. A procedure does not
inherit the trapping state of its caller.
[NO]OVERFLOW_TRAPS Procedure Attribute
The OVERFLOW_TRAPS and NOOVERFLOW_TRAPS procedure attributes specify the default
overflow trapping behavior for a procedure or subprocedure (see Procedure Attributes (page 248)).
The OVERFLOW_TRAPS and NOOVERFLOW_TRAPS procedure attributes override the current
setting of the directive OVERFLOW_TRAPS (page 508).
234 Hardware Indicators