An ARC assembler written in Node.JS.

Usage no npm install needed!

<script type="module">
  import arcAsm from '';


$ arc-asm PayPal Version Downloads Get help on Codementor

An ARC assembler written in Node.JS.


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]

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

  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


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);


For full API reference, see the 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:


KINDLY © Ionică Bizău