Last active
June 16, 2023 02:28
-
-
Save ViniciusFM/4f52d3182946f5c53104e390d3ee842e to your computer and use it in GitHub Desktop.
Desafio de hello world da página Kernelzera do Instagram
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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