Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Latest commit

 

History

History
30 lines (26 loc) · 1.35 KB

README.md

File metadata and controls

30 lines (26 loc) · 1.35 KB

Emulated CPU

Build Status

Description

Simple CPU emulator in Java.
Quick assembly reference

Code examples

CPU test file contains some examples of working code, for example Fibbonacci numbers and factorial calculator and bubble sort implementation. Most of code examples are written with assembly program in comment.

Currently implemented:

  • assembler written in Elixir
  • 4 addressing modes (immediate, register, memory and IOInterface)
  • 26 OP codes
  • memory implementation
  • ALU + registers, as well as status register with Z/C/N flags
  • MOV instruction which moves data from/to memory and registers.
  • jump instructions to branch code
  • basic math operators
  • stack
  • partially support for C based functions (CALL)
  • logging with leveling (DEBUG, INFO)
  • IO interfaces support (devices like virtual hard drive, CD's, networking cards, graphic cards, etc)

TODO:

  • full multicore design
  • offset addressing for arrays
  • interrupts and interrupt vector table
  • replace some code with Lombok's adnotations