Want more features on Pastebin? Sign Up, it's FREE!
Guest

div.asm

By: a guest on Jan 10th, 2013  |  syntax: None  |  size: 0.52 KB  |  views: 23  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. format PE console 4.0
  2. entry main
  3. include 'win32ax.inc'
  4.  
  5. section '.data' data readable writeable
  6. num1 dq 48.6
  7. num2 dq 17.1
  8. result dq ?
  9. fmt db "%g", 10
  10. szBuff db 32 dup (0)
  11.  
  12. section '.code' code readable executable
  13. main:
  14.         fld qword [num1]
  15.         fld qword [num2]
  16.         fdivp
  17.         fstp qword [result]
  18.         cinvoke printf, fmt, double [result]
  19.         invoke ExitProcess, 0
  20.        
  21. section '.idata' import data readable
  22. library kernel32,'kernel32.dll', msvcrt,'msvcrt.dll'
  23. import kernel32, ExitProcess,'ExitProcess'
  24. import msvcrt, printf, 'printf'
clone this paste RAW Paste Data