Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- format PE console
- entry main
- include 'macro/import32.inc'
- include 'macro/proc32.inc'
- section '.data' data readable writeable
- formatas dd '%d',0
- msg1 db 'Iveskite skaiciu: ',0
- msg2 db 'Iveskite daugikli: ',0
- msg3 db 'Iveskite sekos ilgi: ',0
- msg db '%d ',0
- num dd ?
- multi dd ?
- len dd ?
- p db "pause>nul",0
- section '.code' code readable executable
- main:
- push msg1
- call [printf]
- push num
- push formatas
- call [scanf]
- push msg2
- call [printf]
- push multi
- push formatas
- call [scanf]
- push msg3
- call [printf]
- push len
- push formatas
- call [scanf]
- push [num]
- push msg
- call [printf]
- mov eax, [len]
- @multi:
- mov ebx, [num]
- imul ebx, [multi]
- mov [num], ebx
- dec [len]
- push [num]
- push msg
- call [printf]
- cmp [len], 0
- jg @multi
- invoke system, p ;Calling function with invoke command
- invoke exit, 0
- section '.idata' import data readable
- library msvcrt,'msvcrt.dll'
- import msvcrt,\
- printf,'printf',\
- scanf, 'scanf',\
- system,'system',\
- exit,'exit'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement