Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .data
- prompt db 'How old are you? '
- lenPrompt equ $-prompt
- display db 'You are this old: '
- lenDisplay equ $-display
- section .bss
- age resb 3
- section .text
- global _start
- _start:
- mov eax, 4
- mov ebx, 1
- mov ecx, prompt
- mov edx, lenPrompt
- int 0x80
- mov eax, 3
- mov ebx, 2
- mov ecx, age
- mov edx, 3
- int 0x80
- mov eax, 4
- mov ebx, 1
- mov ecx, display
- mov edx, lenDisplay
- int 0x80
- mov eax, 4
- mov ebx, 1
- mov ecx, age
- mov edx, 3
- int 0x80
- mov eax, 1
- mov ebx, 0
- int 0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement