j-helland / 8086-disassembler

Casey Muratori's Computer Enhance! Performance Aware Programming course.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

Disassembler for the 8086 instruction set, which is a primordial form of x86.

Installation

Run the following to generate the build/disassemble-8086 executable.

> mkdir -p build && cd build
> cmake ..
> cmake --build .

While not strictly required, you may want to install NASM on your system to generate binaries from the provided asm/* files.

Usage

The disassemble-8086 executable will output disassembly to STDOUT.

# optional: generate assembled 8086 binary
> nasm asm/p1.asm -o out.bin

> ./build/disassemble-8086 out.bin
mov cx, bx

Testing

Make sure that you have NASM installed. Then run

# Single test
> python test.py -f asm/p1.out
OK asm/p1.asm

# Full test suite
> python test.py -d asm
OK asm/p19-segment-offset-notation.asm
OK asm/p15-arithmetic.asm
OK asm/p10-sub.asm
OK asm/p3-mem-mov.asm
...

About

Casey Muratori's Computer Enhance! Performance Aware Programming course.


Languages

Language:C++ 84.5%Language:Assembly 12.5%Language:Python 2.7%Language:CMake 0.3%