This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
Compiler Error C2422
illegal segment override in 'operand'
Inline assembly code incorrectly uses a segment override operator (semicolon) on an operand.
Possible causes
- The register preceding the operator is not a segment register.
- The register preceding the operator is not the only segment register in the operand.
- The segment override operator appears within an indirection operator (brackets).
- The expression following the segment override operator is not an immediate operand or a memory operand.
Example
_asm
{
mov AX, [BX:ES] //Error
mov AX, ES:[BX] //OK
}