Skip to content

Instantly share code, notes, and snippets.

@MrPowerGamerBR
Created August 16, 2018 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrPowerGamerBR/59fbbfb398ba867152bc741758541aa1 to your computer and use it in GitHub Desktop.
Save MrPowerGamerBR/59fbbfb398ba867152bc741758541aa1 to your computer and use it in GitHub Desktop.
kk eae men o SAM é brabo
section .data
hello: db "Hello!", 10 ; 10 = pular linha (na tabela ASCII)
helloLen equ $-hello ; tamanho da string
kkEaeMen: db "kk eae men", 10
kkEaeMenLen equ $-kkEaeMen
section .text
global main
main:
mov ebp, esp; for correct debugging
mov eax, 4 ; system call para sys_write (4 = escreve para um arquivo ou um dispositivo)
mov ebx, 1 ; queremos escrever no terminal (stdout), por isto iremos usar 1
mov ecx, hello
mov edx, helloLen
int 80h ; chamada do kernel
mov eax, 4 ; system call para sys_write
mov ebx, 1
mov ecx, kkEaeMen
mov edx, kkEaeMenLen
int 80h ; chamada do kernel
mov eax, 1 ; system call para exit
mov ebx, 0 ; parametro para exit
int 80h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment