How do I disassemble raw 16-bit x86 machine code?

sigjuice picture sigjuice · Nov 15, 2009 · Viewed 73.7k times · Source

I'd like to disassemble the MBR (first 512 bytes) of a bootable x86 disk that I have. I have copied the MBR to a file using

dd if=/dev/my-device of=mbr bs=512 count=1

Any suggestions for a Linux utility that can disassemble the file mbr?

Answer

hlovdal picture hlovdal · Nov 15, 2009

You can use objdump. According to this article the syntax is:

objdump -D -b binary -mi386 -Maddr16,data16 mbr