nasm-polyfill
v1.0.0
Published
Support to run NASM from Node.js in sync.
Downloads
4
Maintainers
Readme
nasm-polyfill
Execute NASM code from JavaScript in sync.
Install
npm install -s @allnulled/nasm-polyfillRequirements
You need:
- In Windows:
nasmld
- In Linux:
nasmlink
Usage
const nasm = require("@allnulled/nasm-polyfill");
// Ejemplo de uso
nasm(`
section .data
msg db 'Hello, World!', 0x0A
section .text
global _start
_start:
; Syscall para escribir el mensaje
mov rax, 1
mov rdi, 1
mov rsi, msg
mov rdx, 14
syscall
; Syscall para salir del programa
mov rax, 60
xor rdi, rdi
syscall
`);
console.log("Finished successfully!");