GithubHelp home page GithubHelp logo

clap's Introduction

clap ๐Ÿ‘

doc

the vm

Idea

This project is mainly for research purposes.

The idea behind this project is, to create an virtual machine (=machine) that includes all the issues with computers, for example an overflow in the RAM or wrong memory allocation.

To allow these things there is only a single memory which will contain the code in the lower part of the memory, followed by some space for the heap and the stack on the highest address. This will allow the code to change itself during the runtime.

Installation

# Get the code
$ git clone https://github.com/oltdaniel/clap.git
$ cd clap
# Compile the code
$ make

Usage

# Execute the machine
$ bin/clap help
# Run an example
$ bin/clap run examples/math.asm
# Clean the project
$ make clean

Example

; Jump over the variable space
jump main

; Define the address label math
.nam math

; Set 64bit of the memory to 0
.var 0

; Define the main label
.nam main

; Move 12 to the register 0
move r00 #12

; Add the value of register 0
; to the variable
addi math r00

About

The clap machine is an 64bit based virtual machine. It has 20 registers, an memory that combines the code memory, the heap as well as the stack. To make use of these parts the clap machine uses its own assembly language, that will be compiled down to an bytecode file.

One of the first goals is it, to define an ready to use instruction set, that can be implemented and executed on the machine. For more current in-progress tasks, take a look at the issues.

Documentation

Documentation can be found here in /doc.

License

Just do what you'd like to

license

Credit

Daniel Oltmanns - creator

clap's People

Contributors

0x1daniel avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

clap's Issues

address alias - name cannot be used until it is defined

The following assembly code can't be executed, because the named address is not defined yet.

jump main
; Some variables
.nam main
; The main code

Suggested solution: Define the labels before, and set the address space afterwards. Example code:

; Pre-define the name
.def main
; Jump to the alias
jump main
; Some variables
.nam main
; The main code

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.