Giter Site home page Giter Site logo

urban-engine's Introduction

Urban-engine

Urban-engine is a runtime for a custom binary format with its own instruction set. It is meant to be a toy project and should not be used for anything serious.

Archticture

Registers

The architecture provides 32 registers, 31 of which are for general purpose use.

This table shows the expected usage for each register:

Register Purpose
r0 to r7 These registers are used for parameter passing between functions. Values need to be saved by the caller.
r8 to r15 These registers are temporary. Values need to be saved by the caller.
r16 to r23 These registers are expected to be saved by the callee.
r24 to r30 These registers do not have any special purpose but may be used in any way.
r31 This register stores the stack pointer. It may be used for other purposes.

Memory

The memory accessed by the program is the same that is accessed by the runtime, thus the program could potentially modify runtime values that are not meant to be modified.

Illegal memory access is "handled" by catching segmentation faults (memory access violations on Windows) and panicking.

The instruction set provides instructions to load the memory offset to the start of the binary.

CLI

Installation

For the installation need to have Cargo installed.

To then install the runtime execute the following command:

cargo install --git https://github.com/sqyyy-jar/urban-engine.git --bin urban

This will install the CLI-tool called urban.

Running binaries

To run a binary make sure you can access the binary you want to run in your terminal.

Then just execute the following command:

urban run ./path/to/binary.bin

Compilation (Deprecated)

The CLI supports some experimental kind of compilation. It does not really do anything useful and will be removed in the future.

Writing code

Leviathan

Leviathan is a language I made for this runtime. The language uses a Lisp-style syntax. It currently only supports an assembler mode but will provide a better dialect in the future.

urban-engine's People

Contributors

sqyyy-jar avatar

Watchers

 avatar

urban-engine's Issues

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.