Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include mpcp.inc
- .xmm
- .data
- msg BYTE "Correu: %f",13,10,0
- umPos REAL8 1.0
- umNeg REAL8 -1.0
- num REAL8 0.75
- .code
- fx proto x:real8
- main PROC C
- invoke fx, num
- movsd num, xmm0
- invoke printf, offset msg, real8 ptr [num]
- invoke _getch
- invoke ExitProcess, 0
- main ENDP
- fx PROC x:real8
- movsd xmm0, x
- comisd xmm0, umPos
- jae nDom
- comisd xmm0, umNeg
- jbe nDom
- mulsd xmm0, xmm0
- movsd xmm1, umPos
- subsd xmm1, xmm0
- sqrtsd xmm1, xmm1
- movsd xmm0, umPos
- divsd xmm0, xmm1
- jmp Fim
- nDom: subsd xmm0, xmm0
- Fim: ret
- fx ENDP
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement