Skip to content

Instantly share code, notes, and snippets.

@ViniciusFM
Last active June 16, 2023 02:28
Show Gist options
  • Save ViniciusFM/4f52d3182946f5c53104e390d3ee842e to your computer and use it in GitHub Desktop.
Save ViniciusFM/4f52d3182946f5c53104e390d3ee842e to your computer and use it in GitHub Desktop.
Desafio de hello world da página Kernelzera do Instagram
; programa hello_kernelzera.asm
; compilar:
; $ nasm -f elf64 hello_kernelzera.asm
; $ ld hello_kernelzera.o -o hello.out
; executar:
; $ ./hello.out
global _start
section .text
print:
mov rbx, 0x1
mov rax, 0x4
int 0x80
ret
_start:
mov rcx, msg
mov rdx, msg_len
call print
_exit:
mov rax, 0x1
xor rbx, rbx
int 0x80
section .data
msg db "Hello World, Kernelzera", 0xA, 0x0
msg_len equ $-msg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment