Giter Site home page Giter Site logo

ccvm's Introduction

CC Virtual Machine

This repository contains the sourcecode for the CC Virtual Machine (CCVM). CCVM is a bytecode interpreter (similar to JVM for java) created by Luc de Wit meant to be used as a runtime for non-serious programming languages.

Road-Map

In the future there are plans for extending the functionality of the CCVM and usages of the CC Virtual Machine.

  • Get Hello World running on CCVM
  • Get fibonacci running on CCVM
  • Render a mandelbrot on CCVM
  • Creating an assembly language ontop of CCVM (CCA)
  • Creating a stack based language ontop of CCA
  • Creating a lisp like language ontop of CCA
  • Creating a procedural BASIC-like language ontop of CCA
  • Creating a C-like language ontop of CCA
  • Online CCVM/CCA interpreter using web assembly

Instruction set

The current instructionset of the CC Virtual Machine

  • 0x00 MOV #REG# #LIT#

  • 0x01 MOV #REG# #REG#

  • 0x02 MOV #REG# #MEM#

  • 0x03 MOV #MEM# #LIT#

  • 0x04 MOV #MEM# #REG#

  • 0x05 MOV #MEM# #MEM#

  • 0x06 PUSH #LIT#

  • 0x07 PUSH #REG#

  • 0x08 PUSH #MEM#

  • 0x09 POP

  • 0x0A POP #REG#

  • 0x0B POP #MEM#

  • 0x0C SWAP

  • 0x0D ROTL

  • 0x0E ROTR

  • 0x0F DUP

  • 0x10 ALLOC #reg# #lit#

  • 0x11 ALLOC #reg# #reg#

  • 0x12 ALLOC #reg#

  • 0x13 ALLOC #lit#

  • 0x14 REALLOC #reg# #lit#

  • 0x15 REALLOC #reg# #reg#

  • 0x16 REALLOC #reg#

  • 0x17 REALLOC #lit#

  • 0x18 FREE #reg#

  • 0x19 FREE

  • 0xFD SYSCALL

  • 0xFE DEBUG

  • 0xFF EXIT

SYSCALLS

code name reg a reg b reg c reg d
00 Print memory location to the string length of the string
01 Run ID
02 Time

ccvm's People

Contributors

justlucdewit avatar

Watchers

 avatar

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.