SYMPTOMS
The code below is correctly flagged as an error in the Microsoft Macro
Assembler (MASM) versions 5.0, 6.0, 6.0a, 6.0b, but MASM 5.1 generates a
warning and incorrect code.
The following is the error generated by MASM 5.0
A2019: Wrong type of register
Macro Assembler Version 5.1 fails to generate an error on the MOV
instruction using the 8-bit registers (AH, BH, CH, DH, AL, BL, CL, DL) with
segment registers (CS, DS, ES, SS). Instead, the following warning is
generated
A4057: Illegal size for operand
The code generated is also in error. Each of the (8-bit) byte registers
maps to the set (SP, DI, BP, SI, AX, BX, CX, DX).
The following is the error generated by MASM 6.0
A2024: invalid operand size for instruction