Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .686
- .model flat
- extern _malloc: PROC
- public _float_plus_float
- .code
- _float_plus_float PROC
- push ebp
- mov ebp,esp
- push ebx
- push edi
- push esi
- mov eax,[ebp+8]
- mov ebx,[ebp+12]
- mov esi,eax
- mov edi,ebx
- shr esi,23
- shr edi,23
- sub esi,127
- sub edi,127
- mov ecx,esi
- mov edx,edi
- sub ecx,edx
- and eax,007FFFFFH
- and ebx,007FFFFFH
- or eax,00800000H
- or ebx,00800000H
- shr ebx,cl
- add eax,ebx
- bt eax,24
- jnc bez_przesuniecia
- inc esi
- shr eax,1
- bez_przesuniecia:
- add esi,127
- mov ebx,esi
- shl ebx,23
- and eax,007FFFFFH
- or eax,ebx
- push eax
- fld dword PTR [esp]
- add esp,4
- pop esi
- pop edi
- pop ebx
- pop ebp
- ret
- _float_plus_float ENDP
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement