2.1.1 • Published 6 years ago

ass-js v2.1.1

Weekly downloads
40
License
-
Repository
github
Last release
6 years ago

Assembler implemented in JavaScript:

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.

2.1.1

6 years ago

2.1.0

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.6

7 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago