Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .intel_syntax noprefix ;# polecenia sterujące zaczynają się od '.'
- .global main ;# Ktore symbole/dyrektywy sa widoczne na zewnatrz
- # program dzielimy na dane i na kod programu
- .text ;# Kod programu
- main:
- mov eax, offset x
- push eax
- mov eax, offset formatin
- push eax
- call scanf
- add esp, 8
- mov eax, x
- shl eax, 1
- push eax
- mov eax, offset formatout
- push eax
- call printf
- add esp, 8
- xor eax, eax
- ret
- .data ;# dane
- x: .int 0
- formatin: .asciz "%d"
- formatout: .asciz "%d\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement