here's one of the main reasons i went to the trouble of writing a 386 instruction decoder.

I was relying on the excellent iced-x86 decoder to decode my randomized instructions. but when a form is bad, it just prints '(bad)'. I wanted a little more info.

`marty_dasm` as I call it will show you what the illegal form looks like, in theory.

For example, LDS with a register operand is nonsense, but that's what is encoded, so nothing's stopping us from disassembling it as long as we're clearly marking it as bad.
@gloriouscow Fun fact: LES EAX,ESP (0xc4 0xc4) is a NTVDM v86 monitor syscall.

@crazyc

yeah, iced is producing all sorts of crazy opcodes, which I am forcing to the string '(bad)' instead of what iced actually produces. Unfortunately there's no way to put iced in a cpu-specific mode. You get the whole modern x86 ISA and you're gonna like it.

Mnemonic::Invd,
Mnemonic::Invd,
Mnemonic::Invlpg,
Mnemonic::Vmcall,
Mnemonic::Vmlaunch,
Mnemonic::Vmresume,
Mnemonic::Vmxoff,
Mnemonic::Monitorx,
Mnemonic::Mwaitx,
Mnemonic::Clac,
Mnemonic::Stac,
Mnemonic::Sysret,
Mnemonic::Encls,
Mnemonic::Enclv,
Mnemonic::Rdtscp,
Mnemonic::Skinit,
Mnemonic::Pconfig,
Mnemonic::Vdivsd,
Mnemonic::Clzero,
Mnemonic::Vmrun,
Mnemonic::Vmlaunch,
Mnemonic::Invlpgb,
Mnemonic::Rdpru,
Mnemonic::Xend,
Mnemonic::Xtest,
Mnemonic::Enclu,
@crazyc Obviously I don't want 'syscall' showing up in a set of 386 CPU tests.
@gloriouscow Sure, it's still an invalid opcode after all. I remember reading somewhere that intel sent people to microsoft in the win30 era and asked what they needed to make windows faster and were confused when the response was "make int 6 faster". Microsoft was then using ARPL in v86 mode for vmm syscalls.

@crazyc

just how many damn mnemonics does x86 have

@gloriouscow How many? All of them, of course