Paste: a*2
Author: | fiction |
Mode: | assembly-x86 |
Date: | Sun, 18 Mar 2012 11:24:41 |
Plain Text |
.686
.model flat, stdcall
option casemap:none
include C:/masm32/include/windows.inc
include C:/masm32/include/kernel32.inc
include C:/masm32/include/msvcrt.inc
includelib C:/masm32/lib/kernel32.lib
includelib C:/masm32/lib/msvcrt.lib
.data
ConsoleTitle db 'Input',0
mess_1 db 'Write a: ',0
rez dd ?
formats db '%d',0
formats2 db "a*2 = %d", 0
.code
main:
invoke SetConsoleTitle, addr ConsoleTitle
invoke crt_printf, addr mess_1
invoke crt_scanf,ADDR formats,ADDR rez
imul ebx,rez,2
mov rez, ebx
invoke crt_printf, addr formats2, rez
invoke Sleep, INFINITE
invoke ExitProcess,0
end main
New Annotation