Git Product home page Git Product logo

rubyx-arm's Introduction

Build Status Gem Version Code Climate Test Coverage

Salama in Arm

Salama is about native code generation in and of ruby. Salama defines a Register OO machine.

To get running code, the Register machine code needs to be translated to machine specific binary.

This is the Arm, and as arm is salamas main target, it is the most complete and working version.

Assembly

Produce binary that represents code. Traditionally called assembling, but there is no need for an external file representation.

Ie only in ruby code do i want to create machine code.

Most instructions are in fact assembling correctly. Meaning i have tests, and i can use objbump to verify the correct assembler code is disasembled

I even polished the dsl an so (from the tests), this is a valid hello world:

hello = "Hello World\n" @program.main do mov r7, 4 # 4 == write mov r0 , 1 # stdout add r1 , pc , hello # address of "hello World" mov r2 , hello.length swi 0 #software interupt, ie kernel syscall mov r7, 1 # 1 == exit swi 0 end write(7 + hello.length/4 + 1 , 'hello')

Vm implementation

The actual vm implementation is currently in flux. I tried to go from the ast to assembler, and that proved to big a step.

Hence the actual api is in flux. I just made the separate repository to remove some clutter. Especially in project searches.

rubyx-arm's People

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.