UD1
Usage: UD1 Modifies flags: None
Undefined Instruction
UD0 ; 0F FF [186,UNDOC]
UD1 ; 0F B9 [186,UNDOC]
UD2 ; 0F 0B [186]
UDx can be used to generate an invalid opcode exception, for testing purposes. (not implemented in RosAsm Assembler)
UD0 is specifically documented by AMD as being reserved for this purpose. (not implemented in RosAsm Assembler)
UD1 is documented by Intel as being available for this purpose.
UD2 is specifically documented by Intel as being reserved for this purpose. Intel document this as the preferred method of generating an invalid opcode exception.
All these opcodes can be used to generate invalid opcode exceptions on all currently available processors, but only UD2 is actually implemented in RosAsm Assembler.
Example:
ud1