Advertisement
LipAnn

Untitled

Apr 19th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %include "io.inc"
  2.  
  3. section .data
  4.     two dd 2.0
  5.     four dd 4.0
  6.     format_double db "%f", 0
  7.  
  8. section .text
  9.  
  10. CEXTERN printf
  11.  
  12. global CMAIN
  13. CMAIN:
  14.     mov ebp, esp; for correct debugging
  15.     push ebp
  16.     mov ebp, esp
  17.     sub esp, 8
  18.     finit
  19.     fld dword[four]
  20.     fld dword[two]
  21.     faddp
  22.     fstp dword[esp + 4]
  23.     mov [esp], dword format_double
  24.     call printf
  25.     leave
  26.     xor eax, eax
  27.     ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement