8086 16-Bit Disassembler ━━━━━━━━━━━━━━━━━━━━━━━━ Derived from a disassembler for the 16-bit member, 8086, of the x86 family, originally written by Justo Senka in x86 assembly suitable for processing by MASM or TASM, it has been translated to C, and the assembly language program will be phased out. It only handles the limited subset of the 8086 comprising the opcodes: MOV XCHG TEST INC DEC PUSH POP ADD OR ADC SBB AND SUB XOR CMP NEG NOT MUL IMUL DIV IDIV CALL JMP INT RET RETF IRET LOOP JCXZ Conditional jumps: JO JNO JB JNB JE JNE JNA JA JS JNS JP JNP JL JGE JLE JG and is being staged for upward expansion to include the other opcodes. How to run ────────── The program, DisAsm86, built from DisAsm86.c, can be run from the command-line on a POSIX-compatible host, e.g. as ./DisAsm86 Test.bin Test.s from the command-line prompt. How to run (DOS) ──────────────── To run the legacy DOS program, DisAsm86.exe, built from DisAsm86.asm, a DOS platform is required. It can be run on a 16-bit OS, such as DOS, or on any host that has installed a DOS emulator (such as DOSBox) or other 8086 Emulator, such as Emu8086. The program executes from the command line and expects 2 arguments: - InFile: the file to disassemble, - ExFile: the disassembly output. Example: `DisAsm86 Test.bin Test.s` How to compile ────────────── A Makefile has been provided for the C program, that is suitable for GCC on Linux, or any POSIX-conforming host that a C compiler upwardly-compatible with C99. How to compile (DOS) ──────────────────── The legacy build for the assembly-language program and DOS has been retained, for now. The original Makefile, for the DOS build, has been moved to "MakeDOS". It can be compiled with: - Emu8086: Open source file and press run. Runs on contemporary hosts. - DOS: Using tasm 1.4. For now, a copy of TASM has been provided, along with the MakeDOS makefile for compiling on DOS. The DOS host should have a "make" utility (e.g. "nmake"). To compile by hand, from within DOSBox: `tasm\tasm DisAsm86` command will compile source to obj, and `tasm\tlink DisAsm86.obj` will link the object file to create the executable. Source Code ─────────── Originally written, as a partial implementation of the 8086 instruction set, by the original author in late 2014, as a learning process, it was released under MIT license, there are still limitations and bugs present. Upward Revision ─────────────── Originally released for the benefit of future generations, to help better acquaint them with the legacy 8086, a root canal has been done on the source to open up its structure so that it can be scaled up to handle later versions of the x86 family. Its main talking point is that it is making direct use of the compile binary opcode maps that were originally presented in Intel's 80x86 family references. It may also be downgraded to handle the 8080/8085, which is the immediate forebear of the 8086, as well as the Z80, and may also be included in or attached to the CPU archive, which is being maintained in a separate repository and may, itself, undergo some restructuring.
RockBrentwood/DisAsm86
8086 16-Bit Disassembler written in Assembly; slated for future translation to C and merger with other 8086 disassembler forks.
AssemblyMIT