Microsoft KB Archive/38936

= DOCERR: [bx].month Example Incorrect in MASM Programmer's Guide =

Article ID: 38936

Article Last Modified on 10/29/2003

-

APPLIES TO


 * Microsoft Macro Assembler 5.0
 * Microsoft Macro Assembler 5.1 Standard Edition

-



This article was previously published under Q38936



SUMMARY
The code fragment in section 7.1.3 on Page 147 of the &quot;Microsoft Macro Assembler Programmer's Guide&quot; causes a warning A4031: &quot;Operand types must match.&quot; There is an error in the example.

Change the line below   mov ax, [bx].month to the following:

mov ah, [bx].month



MORE INFORMATION
Because the structure field month is defined as a byte, the assignment to a word register generates the operand-mismatch warning message. The change to a byte register resolves the warning. The following is also acceptable:

mov ax, word ptr [bx].month

Additional query words: 5.00 5.10

Keywords: KB38936

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.