| | |
FPU + external C file - how to return double
![]() |
•
•
Join Date: Apr 2005
Posts: 1
Reputation:
Solved Threads: 0
Hi
I'm working on a piece of assembly procedure that would enable me to return a double value (generated in asm module) to C code.
Up to now never produced such a code, so would be grateful if you could assist me a bit. I know that I should leave the value in st(0)
currently wrote a piece of C :
#include <stdio.h>
extern double test(void) ;
void main ( void )
{
double p ;
p = test () ;
printf ( "The num is %f \n", p ) ;
}
When I write and leave purre integer there's no problem. But how to leave 64bit value in ST ?
I start with
finit
fld... and here comes the problem
thanks for any assistance
Stebel.
I'm working on a piece of assembly procedure that would enable me to return a double value (generated in asm module) to C code.
Up to now never produced such a code, so would be grateful if you could assist me a bit. I know that I should leave the value in st(0)
currently wrote a piece of C :
#include <stdio.h>
extern double test(void) ;
void main ( void )
{
double p ;
p = test () ;
printf ( "The num is %f \n", p ) ;
}
When I write and leave purre integer there's no problem. But how to leave 64bit value in ST ?
I start with
finit
fld... and here comes the problem
thanks for any assistance
Stebel.
![]() |
Similar Threads
- Is it possible to print an external file using javascript? (JavaScript / DHTML / AJAX)
- Reading or writing a double into a bin file (C++)
- Moving <form></form> to an external file? (HTML and CSS)
- Adding to linked list from external file (C)
- error LNK2001: unresolved external symbol (C++)
- Output in Text file-How to apply fprintf()? (C)
- Using x86 Assembly Language with Microsoft Visual C++ (C++)
Other Threads in the Assembly Forum
- Previous Thread: I need help
- Next Thread: MIPS - I'm Not getting the right answer :( Can anybody Review :)
| Thread Tools | Search this Thread |





