TL;DR: Just use https://github.com/iximeow/yaxpeax-x86/
Zydis formats a few things in a way that MASM does not accept with INTEL_MASM:
- The
int3 instruction should be formatted as int 3 for CC or MASM will complain:
It will also complain about int1 but int 1 gets encoded as CD 01 instead of F1. The recommended solution is to use DB 0F1h.
test.asm(6) : error A2008: syntax error : int1
test.asm(7) : error A2008: syntax error : int3
- The x87 floating-point registers
st? should be formatted as st(?):
test.asm(6) : error A2006: undefined symbol : st1
- The
fucomp instruction should be formatted without any operands the implicit st(0) operand:
test.asm(6) : error A2152: coprocessor register cannot be first operand
TL;DR: Just use https://github.com/iximeow/yaxpeax-x86/
Zydis formats a few things in a way that MASM does not accept with INTEL_MASM:
int3instruction should be formatted asint 3forCCor MASM will complain:It will also complain about
int1butint 1gets encoded asCD 01instead ofF1. The recommended solution is to useDB 0F1h.st?should be formatted asst(?):test.asm(6) : error A2006: undefined symbol : st1fucompinstruction should be formatted withoutany operandsthe implicitst(0)operand:test.asm(6) : error A2152: coprocessor register cannot be first operand