Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/11/02 19:59
Read: times


 
#34278 - RE: Little assembly problem
"I wanna call an assembly subroutine in C, the assembly routine must return a double word value."

By "double word" I assume you mean 32 bits?
It's always best to say precisely what you mean (eg "32 bits") rather than use some implementation-dependent terminology like "double word"

What version of Keil C51 are you using?
Note that v6.?? had some bugs with passing longs to functions containing inline assembler - see the Keil forum for details.

Erik has given you the best approach: let the compiler generate the "skeleton" for you, then you just flesh it out!
Note: It's best to turn off optimisation for the file with the SRC directive.

For a full description of Keil's C51 data representation, calling convention, etc, read the section "Interfacing C programs to assembler" in the manual (if you haven't already).

List of 7 messages in thread
TopicAuthorDate
Little assembly problem            01/01/70 00:00      
RE: Little assembly problem            01/01/70 00:00      
RE: Little assembly problem            01/01/70 00:00      
RE: Little assembly problem            01/01/70 00:00      
Off topic>>(hope you don't mind)            01/01/70 00:00      
RE: Off topic>>(hope you don't mind)            01/01/70 00:00      
RE: Off topic>>(hope you don't mind)            01/01/70 00:00      

Back to Subject List