Skip to content

Commit

Permalink
fix: mnemonic include remove .ts
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Jan 2, 2018
1 parent ed1447f commit 7925215
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Assembler implemented in JavaScript:
npm i ass-js
```

## Getting started
## Getting Started

Store `0xBABE` in `RAX` register

Expand Down
13 changes: 13 additions & 0 deletions demo/call.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import {X64} from "../src/index";
import {rbp} from "../src/plugins/x86/operand/generator";

const asm = X64();

asm.code(_ => {
_('mov', [rbp.disp(-16), 0xBABE], 64);
_('call', [rbp.disp(-16)], 64);
});

console.log(String(asm));
asm.compile();
console.log(String(asm));
2 changes: 1 addition & 1 deletion docs/data/db.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Repeat a number 3 times
_('db', 1, 3);
```

Resutl:
Result:

```shell
000 main:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ass-js",
"description": "Assembler.js",
"version": "2.0.0",
"version": "2.0.1",
"keywords": [
"x86",
"x64",
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/x64/PluginX64.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class PluginX64 extends Plugin {
};

mnemonic (name: string, args: any[]) {
const variations: MnemonicVariationsX86 = require('./__generated/' + name + '.ts').default;
const variations: MnemonicVariationsX86 = require('./__generated/' + name).default;

let uiOperands: TUiOperand[] = args[0];
if (uiOperands && !Array.isArray(uiOperands)) {
Expand Down

0 comments on commit 7925215

Please sign in to comment.