SHARE
TWEET

Untitled

a guest Jan 9th, 2011 1,648 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     %define a                           QWORD [ebp+8]
  2.     %define b                           QWORD [ebp+16]
  3.     %define result                      DWORD [ebp+24]
  4.     %define ctrlWord                    WORD [ebp-2]
  5.     %define tmp                         DWORD [ebp-6]
  6.    
  7.     segment .text
  8.         global power
  9.    
  10.     power:
  11.         push ebp
  12.         mov ebp, esp
  13.         sub esp, 6
  14.         push ebx
  15.    
  16.         fstcw ctrlWord
  17.         or ctrlWord, 110000000000b
  18.         fldcw ctrlWord
  19.    
  20.         fld b
  21.         fld a
  22.         fyl2x
  23.    
  24.         fist tmp
  25.    
  26.         fild tmp
  27.         fsub
  28.         f2xm1
  29.         fld1
  30.         fadd
  31.         fild tmp
  32.         fxch
  33.         fscale
  34.        
  35.         mov ebx, result
  36.         fst QWORD [ebx]
  37.        
  38.         pop ebx
  39.         mov esp, ebp
  40.         pop ebp
  41.         ret
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top