Created
August 16, 2018 12:31
-
-
Save MrPowerGamerBR/59fbbfb398ba867152bc741758541aa1 to your computer and use it in GitHub Desktop.
kk eae men o SAM é brabo
This file contains 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
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