mirror of
https://github.com/samsonjs/compiler.git
synced 2026-03-25 08:45:52 +00:00
There is no binary assembler support for Darwin yet! I'm not sure when I will dive into the details of generating a Mach-O binary from Ruby or C. [MERGED] Binary assembler support. It *should* work on ELF but it needs testing on Linux.
13 lines
214 B
NASM
13 lines
214 B
NASM
BITS 32
|
|
GLOBAL _start
|
|
SECTION .data
|
|
{data}
|
|
SECTION .bss
|
|
{bss}
|
|
SECTION .text
|
|
_start:
|
|
{code}
|
|
;; The result in eax is the exit code, move it to ebx.
|
|
mov ebx, eax
|
|
mov eax, 1 ; _exit syscall
|
|
int 0x80 ; call Linux
|