print floating pt using xmm0
Vikas N Kumar
vikasnkumar at users.sourceforge.net
Wed Oct 25 21:09:08 PDT 2006
Hi All
Below is my code to print a floating point number which has been
loaded into XMM0 register.
For some reason it always prints 0.0000. I am not able to figure it
out. Could anyone let me know what I am doing wrong here ? It seems
right based on the manual.
section .data
fltprmpt db "%f",10,0
section .text
global main
extern printf
main:
enter 0,0
mov rdi, dword fltprmpt
mov rdx, 10
cvtsi2ss xmm0, edx
mov rax, 1
call printf
leave
ret
Regards,
Vikas
--
http://www.vikaskumar.org/
More information about the yasm-devel
mailing list