Skip to content

An 8086 simulator in Rust (built during Casey Muratori's Computer Enhance performance-aware programming course)

Notifications You must be signed in to change notification settings

hintron/computer-enhance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computer Enhance 8086 Decoder and Simulator

This is an 8086 instruction decoder and simulator, implemented in the Rust programming language by following the Computer Enhance performance awareness course by Casey Muratori (see the class GitHub repo for listings and for the reference simulator).

This is mainly a personal project for my own benefit. However, I'm hoping to get this into a state where I can run the real-time operating system (RTOS) I implemented in C and assembly on an 8086 emulator for a college class.

If you too would like to try your hand at creating an RTOS on the 8086 in C, take a look at github.com/hintron/8086-toolchain! This repo contains all the lectures, 8086 documentation, and lab files needed to implement the "YAK" RTOS. It also contains an 8086 emulator/debugger, an 8086 compiler, and the NASM assembler (all easily built from source).

Quick start

To run and execute an 8086 binary, do:

cargo run -- <input-8086-binary> <output-log> -e

For example:

cargo run -- files/bench-data/listing_0045_challenge_register_movs tmp.txt -e

To simply decode an 8086 binary, remove the -e flag:

cargo run -- <input-8086-binary> <output-log>

Available options can be seen via -h/--help:

cargo run -- -h

(Decode-only is currently limited to decoding instructions only, and does not know how to skip over data.)

Other docs

About

An 8086 simulator in Rust (built during Casey Muratori's Computer Enhance performance-aware programming course)

Resources

Stars

Watchers

Forks

Packages