MASM Optimizations Not Recognized by Some Processors (69987)
The information in this article applies to:
- Microsoft Macro Assembler (MASM) 5.1
- Microsoft Macro Assembler (MASM) 5.1a
- Microsoft Macro Assembler (MASM) 6.0
- Microsoft Macro Assembler (MASM) 6.0a
- Microsoft Macro Assembler (MASM) 6.0b
- Microsoft Macro Assembler (MASM) 6.11
This article was previously published under Q69987 SUMMARY
For optimization reasons, MASM may generate the opcode 83 for logical
AND, OR, and XOR instructions in some cases, rather than opcode 81.
Unfortunately, opcode 83 was not documented by Intel for 80x86/8088
processors prior to the 80386. Therefore, some processors (such as the
NEC V25 and V35 controllers) and some in-circuit emulators for the
80x86 family do not support this opcode.
In the sample code below, "Listing 1" shows code that will cause the
83 opcode to be generated. "Listing 2" illustrates a way to work
around this situation for those who are using processors that do not
support this opcode and who are using versions of the assembler prior
to 6.0. Note that opcode 83 does work properly on all Intel 80x86/8088
processors, and its generation is by design.
The sign-extension optimization may be disabled in MASM 6.0 and later
with the OPTION directive. To override the default sign-extended
opcodes for AND, OR, and XOR, place the following line at the
beginning of the source file:
OPTION NOSIGNEXTEND
Modification Type: | Minor | Last Reviewed: | 10/29/2003 |
---|
Keywords: | KB69987 |
---|
|