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

ass-js

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ass-js

Assembler.js

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-44.44%
Maintainers
1
Weekly downloads
 
Created
Source

Assembler.js

Assembler implemented in JavaScript:

  • Pluggable design, X64 architecture implemented
  • See supported mnemonics
  • Standalone, use it in browser or Node.js

Install

npm i ass-js

Getting started

Store 0xBABE in RAX register

import {X64} from 'ass-js';

const asm = X64();
asm._('mov', ['rax', 0xBABE]);

Compile to machine code

console.log(code.compile()); // <Buffer 48 c7 c0 be ba 00 00>

Show text representation

console.log(String(code));
// 000 main:
// 001   movq rax, 0x0000BABE ; 000000|000000 0x48, 0xC7, 0xC0, 0xBE, 0xBA, 0x00, 0x00 7 bytes

Use templates

const template = _ => {
    _('mov', ['rdx', 0xC001]);
    _('mov', ['rax', 0xBABE]);
};

asm.code(template);

Docs

License

Unlicense - public domain.

Keywords

FAQs

Package last updated on 01 Jan 2018

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