SHARE
TWEET

Untitled

a guest Mar 20th, 2017 65 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.  
  6. include \masm32\include\windows.inc          
  7. include \masm32\include\kernel32.inc        
  8. include \masm32\include\masm32.inc          
  9. include \masm32\include\user32.inc          
  10. include \masm32\include\debug.inc          
  11.                                              
  12. includelib \masm32\lib\kernel32.lib          
  13. includelib \masm32\lib\user32.lib            
  14. includelib \masm32\lib\masm32.lib            
  15. includelib \masm32\lib\debug.lib            
  16.  
  17. .data
  18.  
  19. v dd 1
  20. d dd 0
  21. x dd 1
  22. maxd dd 0
  23. maxv dd 0
  24.  
  25. .code
  26. start:
  27. mov eax, v
  28.  
  29. starttwo:
  30. mov ecx, x
  31. mov ebx, 0
  32. add eax, 1
  33. cmp v, 10000
  34. jle lessequal
  35. jmp ending
  36.  
  37. lessequal:
  38. cmp ecx, eax
  39. jle division
  40. jmp starttwo
  41.    
  42. division:
  43. mov edx, 0
  44. div ecx
  45. inc ecx
  46. cmp edx, 0
  47. je biggest
  48. jmp lessequal
  49.    
  50. biggest:
  51. add ebx, 1
  52. cmp maxd, ebx
  53. jle lessequal
  54. mov maxd, ebx
  55. mov maxv, eax
  56. jmp lessequal
  57.    
  58. ending:
  59.     PrintDec maxd
  60.     PrintDec maxv
  61.  
  62. ret
  63. end start
RAW Paste Data
Top