NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: nullptr on May 13, 2013, 08:46:01 AM
-
Hi all,
How to print floats single and double precission using libc on linux in 64 bit code. could some give some examples.
thanks in advance.
-
Try looking at the docs first, try some code, and when stuck, post what you are having trouble with.
http://www.cplusplus.com/reference/cstdio/fprintf/
http://www.cplusplus.com/reference/cstdio/printf/
-
Hi nullptr,
printing floating point values via libc under 64 bit Linux is little bit tricky. I've attached for you a simple test program and I hope it'll show you the right direction. The tricky part is to ensure the 16 bit alignment of the stack.
Gerhard
-
Thanks for replies. I'll follow the links and try the code.