arc-int

4.1.1 • Public • Published

$ arc-int PayPal Version Downloads Get help on Codementor

An ARC interpreter written in Node.JS.

Installation

You can install the package globally and use it as command line tool:

$ npm i -g arc-int

Then, run arc-int --help and see what the CLI tool can do.

Example

Here is an example how to use this package as library. To install it locally, as library, you can do that using npm:

$ npm i --save arc-int
// Dependencies
var ArcInterpreter = require("arc-int")
 
// Interpret
console.log(ArcInterpreter.interpret([
    1,1,0,0, 0,0,1,0, 0,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0, 0,0,0,1, 0,0,0,0, // ld [x], %r1
    1,1,0,0, 0,1,0,0, 0,0,0,0, 0,1,0,1, 0,0,1,0, 0,0,0,0, 0,0,0,1, 0,1,0,0, // ld [y], %r2
    1,0,0,0, 0,1,1,0, 1,0,0,0, 0,0,0,0, 0,1,0,0, 0,0,0,0, 0,0,0,0, 0,0,1,0, // addcc %r1, %r2, %r3
    1,0,0,0, 0,0,0,1, 1,1,0,0, 0,0,1,1, 1,1,1,0, 0,0,0,0, 0,0,0,0, 0,1,0,0, // jmpl %r15+4, %r0
    0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,1,0, // x: 2
    0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 1,0,1,0, // y: 0xa
]));

Documentation

For full API reference, see the DOCUMENTATION.md file.

How to contribute

Have an idea? Found a bug? See how to contribute.

Where is this library used?

If you are using this library in one of your projects, add it in this list. ✨

License

KINDLY © Ionică Bizău

Readme

Keywords

Package Sidebar

Install

npm i arc-int

Weekly Downloads

1

Version

4.1.1

License

KINDLY

Last publish

Collaborators

  • ionicabizau