Giter Site home page Giter Site logo

8-bit-risc-machine's Introduction

8-bit-risc-machine

A small, 8-bit VM running a semi-RISC instruction set. Programmed in Rust/Cargo. Created for a DofE project!

The machine

The machine is like any normal 8-bit computer, except that the fundamental flaw with 8-bit machines, namely their lack of memory, is solved not with 16-bit memory addresses, but instead with 'ports'. Each 'port' has 256 bytes of memory, and the machine has 8 ports, and has instructions for each one, like save/load. The idea is that each port has different processes attached, for example, in this VM port 100 is for I/O. Commands are entered into these ports exactly how memory is saved, removing the need for interrupt sequences.

How to use

Currently supported commands are:

run - runs a .red or .rex file
compile - compiles a .rasm file to a specified location

For an example try:

cargo run --release run example.red

N.B. Please run the release version, otherwise overflow will be disabled, and result in a panic. Yeah, I know. I couldn't be bothered to implement wrapping.

FAQ

Why the hell don't you have wrapping?

I'm lazy.

Why did you make this? Seriously, why?

Because I couldn't be bothered to learn assembly, so I decided to create my own.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.