New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

arc-asm

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arc-asm

An ARC assembler written in Node.JS.

latest
Source
npmnpm
Version
4.0.1
Version published
Maintainers
1
Created
Source

$ arc-asm PayPal Version Downloads Get help on Codementor

An ARC assembler written in Node.JS.

Installation

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

$ npm i -g arc-asm

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

$ arc-asm --help
Usage: arc-asm [options]

Options:
  -s, --source <path>  Sets the source file path.   
  -o, --output <path>  Sets the output file path.   
  -h, --help           Displays this help.          
  -v, --version        Displays version information.

Examples:
  arc-asm -s my-input.asm # This will generate a.out
  arc-asm -s my-input.asm -o program # This will generate the `program` file.

Documentation can be found at https://github.com/IonicaBizau/arc-assembler

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-asm
// Dependencies
var ArcAssembler = require("arc-asm");

// Compile input
var result = ArcAssembler.compile(
           "! Sum of two numbers"
  + "\n" + "! This is a comment"
  + "\n" + "     .begin"
  + "\n" + "     .org 2048"
  + "\n" + "     ld [x], %r1"
  + "\n" + "     ld [y], %r2"
  + "\n" + "     addcc %r1, %r2, %r3"
  + "\n" + "     jmpl %r15+4, %r0"
  + "\n" + "x:   2"
  + "\n" + "y:   0xa"
);

// Show some output
result.raw.forEach(function (c) {
    console.log(c.code.match(/.{1,4}/g).join(" ") + " << Line " + c.line);
});

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. :sparkles:

License

KINDLY © Ionică Bizău

Keywords

arc

FAQs

Package last updated on 14 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts