SHARE
TWEET

div.asm

a guest Jan 10th, 2013 30 Never
  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'
RAW Paste Data
Top