SYMPTOMS
The comparison of a constant and a relocatable is not allowed. The
following example demonstrates three approaches to comparing a constant and
a relocatable. In the Microsoft Macro Assembler (MASM) 5.1 and 5.1a you
will get the warning:
warning A4031: Operand types must match
on the first of these approaches. In MASM 6.0, 6.0a, and 6.0b you will get
the error:
error A2026: constant expected
on the first of these approaches, and you will get the error:
error A2094: operand must be relocatable
on the second. The third approach, which turns the relocatable into a
constant by subtracting the beginning of the segment, will work.