Giter Site home page Giter Site logo

brookshear-vm's Introduction

Brookshear VM

 _                     _        _                            _   ____  ___
| |                   | |      | |                          | | | |  \/  |
| |__  _ __ ___   ___ | | _____| |__   ___  __ _ _ __ ______| | | | .  . |
| '_ \| '__/ _ \ / _ \| |/ / __| '_ \ / _ \/ _` | '__|______| | | | |\/| |
| |_) | | | (_) | (_) |   <\__ \ | | |  __/ (_| | |         \ \_/ / |  | |
|_.__/|_|  \___/ \___/|_|\_\___/_| |_|\___|\__,_|_|          \___/\_|  |_/

A brookshear virtual machine with support for step-by-step emulation, compilation, and decompilation.

Features

  • Run assembly code or binary bytecode
  • Various verbosity levels allow detail-rich, step-by-step debugging
  • Compile assembly instructions to bytecode in a binary file
  • Decompile bytecode from a binary file to assembly instructions
  • Extra instruction (opcode 0xD) for relative (offset) branch

Download

Check Releases

Help

  • For general help run with argument -h or --help
  • For help on the extra instructions run the command extendedHelp

Relative branch if equal

Examples:

Bytecode | Instruction  | Comment
-----------------------------------------------------------------------
D104     | jmpeq +4, r1 | ; branch forward by 4 bytes (2 instructions)
D312     | jmpeq -2, r3 | ; branch backward by 2 bytes (1 instruction)

It accepts a single nibble as offset, and can be either positive (+4) or negative (-2). When compiling, the instruction is encoded as follows:

D - opcode                  D
R - destination register  [0-F]
O - branch direction      [0-1] : 0 for +/forward, 1 for -/backward
X - offset                [0-F]

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.