IDA Pro as a disassembler is capable of creating maps of their execution to show the binary instructions that are actually executed by the processor in a symbolic representation (assembly language). Advanced techniques have been implemented into IDA Pro so that it can generate assembly language source code from machine-executable code and make this complex code more human-readable.
8086 disassembler download 9 7
If you're just looking to use a disassembler, then objdump is one choice. The disassembler that comes with the nasm assembler is ndisasm. You can also run "debug.exe" in DOS Box on Linux, provided you get a hold of a copy of the program. It also does disassembly, as well as controlled execution; i.e. simulation of the CPU, itself - which is also important, even when doing disassembly, for reasons I'm about to describe.
This gets to the other sense of your query: "I want to make a disassembler". The source for ndisasm is available, and it handles many of the descendants of 8086, not just 8086, itself (which seriously clutters it, if all you want is an 8086 or even 80386 disassembler), but it is not self-contained and has a heavy dependency on the rest of the distribution.
Its main talking point is that it uses octal digits for the opcodes - which better fits the 80x86 - as I pointed out on the USENET in 1995 in comp.lang.asm ... and (in fact) nasm's creation was a direct response to that. So, it's potentially more transparent and you may want to keep the source handy as a check and comparison, if you're making your own disassembler.
And then you've just disassembled a disassembler that also happens to do CPU emulation, like Fake86 does - but only for the 8086. You'll have to make the absolute addresses relative (using the original relocation table as a guide), to make is re-assemblable. Once you do that, you can work on the source. The opcode table is in clear view (if you display it as text) - both when seen in the packed and unpacked versions of debug.exe.
There's also DosDebug up on GitHub. It handles everything up to "80586" (or Pentium") and "80686": it flags a generation "6" for some instructions.; e.g. the conditional "cmov" operations are handled by it, as well as their "fcmov" floating point versions. DosDebug is in 8086 assembly and is best-suited to compile with jwasm. You might be able to run nasm on it, I don't know. I never tried.
I might port the DAS disassembler to the x86, since items (a)-(f) are already incorporated into DAS's design. I've only ever ported it to the 8051, 6800, 6809 and 8080/8085 (and Z80) up to now; but the transition from 8085 to 8086 is relatively small. To that end, I might hack something out of Fake86. That's mostly abandonware, now, since the author replaced it by XTulator, as Fake86 was written when the programmer was relatively new to C. You might also be able to hack something directly out of DosDebug's opcode tables (their "instr.*" files).
The rows in the mix output histograms come in two flavors. The rows that begin with "*" are meta-categories which sum up the data in different ways. Here are descriptions of some of the meta categories:*scalar-simd anything with the XED_ATTRIBUTE_SIMD_SCALAR including AVX and SSE operations. The instructions that operate on one vector element and whose iclass name ends with "SS" or "SD" have this attribute.*sse-scalar any SSE instruction with the XED_ATTRIBUTE_SIMD_SCALAR*sse-packed any SSE instruction without the XED_ATTRIBUTE_SIMD_SCALAR*avx-scalar Any AVX instruction with the attribute XED_ATTRIBUTE_SIMD_SCALAR*avx128 Any AVX instruction with a 128b vector length but without the XED_ATTRIBUTE_SIMD_SCALAR*avx256 Any AVX instruction with a 256b vector length*avx512 Any AVX instruction with a 512b vector length.*mem-atomic Atomic memory operations*stack-read Stack reads*stack-write Stack writes*iprel-read IP-relative memory reads*iprel-write IP-relative memory writes*mem-read-1 Memory read, 1 byte*mem-read-2 Memory read, 2 bytes*mem-read-4 Memory read, 4 bytes*mem-read-8 Memory read, 8 bytes*mem-write-1 Memory write, 1 byte*mem-write-2 Memory write, 2 bytes*mem-write-4 Memory write, 4 bytes*mem-write-8 Memory write, 8 bytes*isa-ext-BASE The "BASE" ISA-extension (generic group of instructions. Base includes much of the older instructions*isa-ext-LONGMODE The set of instructions added with Intel64. These may be 32b or 64b instructions*isa-set-I186 ISA "set" is a categorization of instructions in the BASE ISA-extension. I186 includes instructions introduced on the 80186 processor.*isa-set-I386 ISA "set" is a categorization of instructions in the BASE ISA-extension. I386 includes instructions introduced on the 80386 processor.*isa-set-I486REAL ISA "set" is a categorization of instructions in the BASE ISA-extension. I486REAL includes instructions introduced on the 80486 processor and valid in REAL mode.*isa-set-I86 ISA "set" is a categorization of instructions in the BASE ISA-extension. I86 includes instructions introduced on the 8086 processor.*isa-set-LONGMODE ISA "set" is a categorization of instructions in the LONGMODE ISA-extension. LONGMODE includes instructions introduced with Intel64 mode.*isa-set-PENTIUMREAL ISA "set" is a categorization of instructions in the BASE ISA-extension. PENTIUMREAL includes instructions introduced with Pentium and valid in REAL mode.*isa-set-PPRO ISA "set" is a categorization of instructions in the BASE ISA-extension. PPRO includes instructions introduced with the PentiumPro.*lock_prefix Instructions with a 0xF0 LOCK prefix*rep_prefix Instructions with a 0xF3 REP prefix*repne_prefix Instructions with a 0xF2 REPNE prefix*osz_prefix Instructions with a 0x66 prefix*rex_prefix Instructions with a REX prefix (includes the following 4 cases). REX prefixes can be sued without any of the following 4 bits set as well.*rexw_prefix Instructions with a REX prefix with the REX.W bit set*rexr_prefix Instructions with a REX prefix with the REX.R bit set*rexx_prefix Instructions with a REX prefix with the REX.X bit set*rexb_prefix Instructions with a REX prefix with the REX.B bit set*one-memops Instructions with one memory operation*two-memops Instructions with two memory operations*disp_only Instructions with a memory operation that addresses memory without using a base register or index register -- just a displacement.*base_index Instructions with a memory operation that addresses meory using a base and index register, but without a displacement.*base_index_disp Instructions with a memory operation that addresses memory using a base, index and displacement.*scale_1 Number of instructions with a scale=1 for the index register*scale_2 Number of instructions with a scale=2 for the index registern*scale_4 Number of instructions with a scale=4 for the index register*scale_8 Number of instructions with a scale=8 for the index register*memdisp8 Memory operations with 8-bit displacements*memdisp32 Memory operations with 32-bit displacements
Free software, uploaded by the author. Index A B C D E F G H I J [K] L M N O P Q R S T U V W X Y Z KVL29EOSSummary:Hires graphics library for Eclipse (adv. GUI)License:FreewareAuthor:Grzegorz KowalEmail:kojak@yoyo.plDownload:kvl29eos.zip(Apr 7 2000, 115.9K)Description:Kojak's VESA Library 2.9 is a set of functions useful for the simplecreation of 32-bit GUI DOS programs under the Eclipse Operating System(DOS Extender). It supports VESA 1.x or 2.x BIOS in 640x480x256,800x600x256 and 1024x768x256 modes. The library implements macros andfunctions providing support for block, line and pixel operations,pallette manipulation, GIF, Color-IX bitmaps, text, filtered input,advanced graphic user interface, and more. Index A B C D E F G H I J K [L] M N O P Q R S T U V W X Y Z LOADEMSSummary:ASM example of load & execute from EMS memoryDownload:loadems.zip(Feb 25 1990, 3.1K) LW 8086/80186Summary:Pop-up help for instruction setDownload:lw86.zip(Nov 20 1986, 14.3K) Index A B C D E F G H I J K L [M] N O P Q R S T U V W X Y Z M68DISVersion:2.0Summary:Intelligent MC6800/6802 disassembler,License:FreewareDownload:m68dis20.zip(Nov 26 2000, 11K)Description:The M68DIS program is a disassembler for MC6800/6802. It's operationis controlled by a command file, which tells it what binary code imagefile(s) to load, the addresses for code entry points such as RST, NMI,etc. (optional), and the addresses for any code or subroutines whichmay not be explicitly called within the MC6800/6802 code. The programthen processes the code, tracing execution paths and identifying jumplocations, subroutines and data tables. The program output is normallyin "list" format, with an address column at the start of each line,however, this address column is omitted if the specified output filename ends in ".ASM". MAC 8080Summary:TASM macros to assemble codeDownload:mac8080.zip(Nov 24 1991, 9.9K) MASM_CN 6Summary:Converts v6.x .ASM to v5.x formatLicense:SharewareEmail:john.augustine@gmiibbs.comDownload:masm_cn3.zip(May 31 1997, 8K)Description:MASM converter converts the MASM v6.x Assembly Source Code (.ASM) to the format used by the older MASM v5.x assemblers. This allows you to assemble, after the conversion, the new source code with an older assembler (the author uses MASM v5.1). The new source code comes from such sources as a disk when you purchase an assembly related book, software distributors, etc. MASM32 V9.0Summary:32 bit MASM assembler from MicrosoftDownload: m32v9r.zip(3,455K) MASM ReferenceSummary:Microsoft MASM assembler reference manualDownload: MASMReference.pdf(646K) MD 8086Summary:Masterful Disassembler for Intel programsDownload:md86.zip(Jun 24 1990, 153.4K) MMXTASMSummary:Turbo Assembler macros for MMX programmingLicense:FreewareAuthor:Normand LeclercEmail:lecn1306@ele.etsmtl.caDownload:mmxtasm0.zip(Mar 14 1998, 6.8K)Description:Now TASM users can code for MMx processors with TASM. Based on Intel's iammx.inc file, I managed to create a new set of macros using Ideal programming mode. I have also included an example on how to use them and how they are transparent. The example is MSDOS based and I did not include a pre-compiled version, instead, I included a makefile for easy creation. The example uses case-sensitivity compilation but the macros will work well without it. This is still a beta release. I expect to have some bugs even if I tested every instructions. MODES 013hSummary:Switch to mode/03h without BIOS - ASM srcDownload:modes.zip(Jan 27 1997, 6.1K) MODEXSummary:High performance ASM video routinesDownload:modex105.zip(May 22 1996, 258.7K) MOUSEAPI Docs on the interrupt functions used to control the mouse in DOS. Download
2ff7e9595c
Comments