I read the recent article Longest x86 Instruction http://blog.onlinedisassembler.com/blog/?p=23I attempted to reproduce the curious disassembly issue on a Win7x86 development platform using masm and as the article suggested, redunant prefixes.Talk is cheap, so here's a toy program (masm32):.386 .model flat, stdcalloption casemap:noneincludelib \x\x\kernel32.libincludelib \x\x\user32.libinclude \x\x\kernel32.incinclude \x\x\user32.incinclude \x\x\windows.inc.codestart:db 0F3hdb 0F3hdb 0F3hdb 0F3hdb 0F3hdb 0F3hdb 0F3h;...6 more bytes laterdb 089hdb 0E5hend startinvoke ExitProcess, NULLAfter linking and assembling, I opened the resulting executable in windbg. To my disappointment, when I single step, unassemble the $exentry, etc. windbg simply sees the prefixes/bytes as individual instructions, says 'to hell with it' and executes only the valid instructions.Is there something I'm missing?
Longest x86 Instruction
disassembly;assembly;windbg
Is there something I'm missing?The disconnect is that the ODA disassembler referenced in http://blog.onlinedisassembler.com/blog/?p=23 produces different output than WinDbg's disassembler given the same input.Perhaps what you're missing is based on the assumption that all disassemblers produce the same output given the same input, which is not a correct assumption to make.