GitHub_collection_hello-world/a/Assembler NASM FreeBSD.asm

26 lines
268 B
NASM
Raw Normal View History

section .text
2021-05-08 09:57:36 -05:00
global _start
_syscall:
2021-05-08 09:57:36 -05:00
int 0x80
ret
2021-05-08 09:57:36 -05:00
_start:
2021-05-08 09:57:36 -05:00
push dword len
push dword msg
push dword 1
mov eax,0x4
call _syscall
2021-05-08 09:57:36 -05:00
add esp,12
2021-05-08 09:57:36 -05:00
push dword 0
mov eax,0x1
call _syscall
section .data
2021-05-08 09:57:36 -05:00
msg db "Hello World",0xa
len equ $ - msg