Advertisement
Guest User

Untitled

a guest
Jan 10th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .386                   
  2. .model flat, stdcall   
  3. option casemap: none   
  4.  
  5. include c:\masm32\include\kernel32.inc
  6. include c:\masm32\include\masm32.inc
  7.  
  8. includelib c:\masm32\lib\kernel32.lib
  9. includelib c:\masm32\lib\masm32.lib
  10.  
  11. .data
  12.     strMessage  db "Hello World! ",0
  13.     strInputMessage db "> ",0
  14.     strInput db 100 dup(?)
  15.  
  16. .code
  17.     mov eax, 3
  18.     mov ecx, 9
  19.     jmp mult
  20.  
  21. mult:
  22.     add eax, eax
  23.     dec ecx
  24.     cmp ecx, 0
  25.     jne mult
  26.     ret
  27. end mult
  28.  
  29. start:
  30.     invoke StdOut, addr strMessage
  31.     invoke StdOut, addr strInputMessage
  32.     invoke StdIn, addr strInput, 100
  33.     invoke exitProcess, 0
  34. end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement