Hello! I have a some trouble. I'm writing some library on ASM. This library contane some function takes as a parameter two doubel or float (in Cx51, this types identicly) variable. If i call this function from ASM i manualy place this variable, example, in R0 R1 R2 R3 - first var. and R4 R5 R6 R7 - second var, but if i definate this function in C
double func(double var1, double var2)
, this mean next: on call this function first variable by compiler will be placed in R4 - R7 registers, but second variable will be placed in a place determined by the compiler. See http://www.keil.com/support/docs/2314.htm. How i can write similar function in my library, which can be called from C source(with out more operation with vars). Example :
double var3 = my_func(double var1,double var 2)
. Thank for help!.
Thanks guys for your help! I try to use you reply's.