Skip to content

CPU Emulator implementation using self-written libraries

Notifications You must be signed in to change notification settings

V13kv/CPU-Emulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPU Emulator implementation Build Status

Implementation of CPU emulator and custom assembler for it.
Third task in MIPT in the first year of education.

Motivation

The idea is to understand how CPU works, how CPU communicates with devices (input, output), how assembler works, how translation process is done, how CPU processes bytecode, what is CPU microcode and how it is implemented and some other intricacies of CPU, assembler.

Documentation

You can see the user documentation here and developer documentation here.

What does this project have?

This project has two main parts:

  1. Assembler implementation with custom ISA.
  2. Custom CPU Emulator implementation with DSL for it.

Supported assembler commands

  1. Data manipulating: push, pop.
  2. Arithmetic: add, sub, mul, div, sqrt.
  3. Program flow control: call, ret, jmp, je, jl, jg, jne.
  4. I/O: out, outc, in.
  5. Logical: cmp.

Program architecture

Coming soon...

Implementation details

Coming soon...

Setting up

Clone the repository

git clone https://github.com/V13kv/CPU-Emulator;
cd CPU-Emulator

Compiling

make init;
make asm proc

Running

./asm.exe <path_to_vasm_file> <output_file_name>
./proc.exe <path_to_compiled_vasm_file>