FIX: Nested NOT Operators Yield Incorrect ValueLast reviewed: September 16, 1997Article ID: Q79286 |
6.00 6.00a 6.00b | 6.00 6.00a 6.00b
MS-DOS | OS/2kbtool kbfixlist kbbuglist The information in this article applies to:
SYMPTOMSIf the NOT operator is used more than once in an expression in the Microsoft Macro Assembler (MASM), an incorrect value may be generated. For example:
mov ax, not(not 0Fh)incorrectly generates:
mov ax, FFF1h RESOLUTIONTo work around this, avoid using consecutive NOT operators. Using two NOT operators is equivalent to using none.
STATUSMicrosoft has confirmed this to be a problem in MASM versions 6.0, 6.0a, and 6.0b. This problem was corrected in MASM for MS-DOS version 6.1.
MORE INFORMATIONSince the NOT operator should perform a bitwise or logical NOT operation, two consecutive NOTs should produce the original number. The sample code below demonstrates the problem.
Sample Code; Assemble options needed: none .MODEL small .STACK 4096 .CODE .startup mov ax, not(not 0fh) .exit 0END
|
Additional reference words: 6.00 6.00a 6.00b buglist6.00 buglist6.00a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |