Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dasm

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dasm

An emscripten-compiled version of the dasm macro assembler

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

The dasm macro assembler (for JavaScript)

This is an emscripten-compiled version of the dasm macro assembler. It was created so 6502 assembly code could be compiled from JavaScript code. More especifically, it can be used to create Atari VCS 2600 and Fairchild Channel F roms from its macro assembly source code.

Technical information

This package uses version 2.20.11 of dasm.

It was built on Linux (err, Windows 10 bash) from the dasm source using the following commands:

emmake make
mv src/dasm src/dasm.bc
emcc src/dasm.bc -o dasm.js

The following changes were manually applied to the exported file:

  1. Wrapped the code with a function that could export it as a module
  2. Exported the created module as the result of a function call
  3. Exposed its internal file system through a FS variable

Usage

import * as dasm from "dasm";

// Read utf-8 assembly source
const src = "...";

// Run with any number of parameters
const result = dasm(src, "-f1", "-ofile.out", "-lfile.lst", ...);

// Read the output as a binary (int array)
const ROM = result.FS.readFile("file.out");

More information

Please download dasm to check its command line documentation.

Check the emscripten FileSystem to learn about FS.

Todo

  • More examples, including on how to include files
  • Expose the module initialization options
  • TypeScript definitions

Contributions are welcome.

License

This follows dasm itself and uses the GNU Public License v 2.0.

Keywords

FAQs

Package last updated on 03 Jan 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc