Assembly Language Help (alang.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
C-Style Comparison Operators
◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
See also: .IF, .UNTIL, .WHILE, Relational operators
Operator Meaning
== Equal
!= Not equal
> Greater than
>= Greater than or equal to
< Less than
<= Less than or equal to
& Bit test (format: expression & bitnumber)
! Logical NOT
&& Logical AND
|| Logical OR
CARRY? Carry bit set
OVERFLOW? Overflow bit set
PARITY? Parity bit set
SIGN? Sign bit set
ZERO? Zero bit set
The comparison run-time operators are used to make comparisons
between variables, registers, and constants as the program is
being executed. Use these operators to give conditions for
conditional-control directives (.IF, .UNTIL, .WHILE). These
operators can be combined with other run- time operators and
parentheses to form complex conditions.
The conditional-control directives (.IF, .UNTIL, .WHILE) can also
check the state of processor flags. The CARRY?, OVERFLOW?,
PARITY?, SIGN?, and ZERO? flags can be used directly in a C-style
expression.
For example:
.IF !PARITY? || ( AX == 0 ) ;Execute body of block if parity
∙ ;flag is clear or if the AX
∙ ;register is zero
∙
.ENDIF
Note: The expression is evaluated from left to right, so in this
example, the state of the parity flag is checked before the
AX comparison.
-♦-