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

jakub-gonet/emulated_cpu

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published