
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
This is an emscripten-compiled version of the dasm macro assembler.
The dasm macro assembler transforms assembly code into 6502-compatible executable binary code. Since this is a JavaScript port of dasm, it allows that compilation process from JavaScript programs; more especifically, it can be used to create Atari VCS 2600 and Fairchild Channel F ROMs from a string containing dasm-compatible assembly source code.
In other words, it turns something like this:
; Pick the correct processor type
processor 6502
; Basic includes
include "vcs.h"
include "macro.h"
; Start address
org $f000
; Actual instructions
start SEI
CLD
LDX #$FF
TXS
LDA #$00
...
...into its equivalent byte code:
f000 78
f001 d8
f002 a2 ff
f004 9a
f005 a9 00
...
This package uses version 2.20.11 of dasm. It supports the following processor architectures:
Among other features, dasm supports:
This specific port 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 dasmj.js
file:
FS
variableimport * 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");
Please download dasm and check its full documentation for more information and command line switches.
Check the emscripten FileSystem to learn about FS
and how to use it.
dasm-cli
)Contributions are welcome.
This follows dasm itself and uses the GNU Public License v2.0.
FAQs
An emscripten-compiled version of the dasm macro assembler
We found that dasm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.