Created
September 25, 2012 20:42
-
-
Save agutoli/3784311 to your computer and use it in GitHub Desktop.
Hello world em assembly
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
| ; Exemplo de um Hello World em Assembly | |
| ; ld -m elf_i386 -s -o hello hello.o | |
| section .text align=0 | |
| global _start | |
| mensagem db 'Hello world', 0x0a | |
| len equ $ - mensagem | |
| _start: | |
| mov eax, 4 ;SYS_write | |
| mov ebx, 1 ;N煤mero do file descriptor (1=stdout) | |
| mov ecx, mensagem ;Ponteiro para a string. | |
| mov edx, len ; tamanho da mensagem | |
| int 0x80 | |
| mov eax, 1 | |
| int 0x8 |
I have a headache馃槆
Vi na faculdade que essa linguagem foi a primeira depois da linguagem de m谩quina. S贸 depois de um tempo que percebi que foi necess谩rio 12 linhas de c贸digo pra printar um simples hello world. Impressionante.
bizarro!
nem sei como explicar isso,kkkkk
Linus deve estar orgulhoso de voc锚
Cool
medo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
brutal