Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Brincando com db
- ;Lincoln Cesar dos Reis Arantes
- ;https://www.tutorialspoint.com/compile_assembly_online.php
- section .text
- global _start ;must be declared for using gcc
- _start: ;tell linker entry point
- mov edx, len ;message length
- mov ecx, msg ;message to write
- mov ebx, 1 ;file descriptor (stdout)
- mov eax, 4 ;system call number (sys_write)
- int 0x80 ;call kernel
- ; mostrando o resultado
- mov eax, 4
- mov ebx, 1
- mov ecx, varent0
- mov edx, 9
- int 0x80
- ; mostrando o resultado
- mov eax, 4
- mov ebx, 1
- mov ecx, varent1
- mov edx, 9
- int 0x80
- ; mostrando o resultado
- mov eax, 4
- mov ebx, 1
- mov ecx, varent2
- mov edx, 9
- int 0x80
- ; mostrando o resultado
- mov eax, 4
- mov ebx, 1
- mov ecx, varent3
- mov edx, 9
- int 0x80
- ; mostrando o resultado
- mov eax, 4
- mov ebx, 1
- mov ecx, varent4
- mov edx, 9
- int 0x80
- mov eax, 1 ;system call number (sys_exit)
- int 0x80 ;call kernel
- section .data
- varent0 db 'conteudo0'
- varent1 db 'conteudo1'
- varent2 db 'conteudo2'
- varent3 db 'conteudo3'
- varent4 db 'conteudo4'
- msg db 'Mostrando as variaveis',0xa ;our dear string
- len equ $ - msg ;length of our dear string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement