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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/12/04 09:43
Read: times


 
#62403 - Three Times now!
Responding to: ???'s previous message
Tim Wood said:
I have managed to allow the c program to call these functions but i'm unsure of how to pass arguments between them ... Any help would be much appreciated.


But I have already told you - in your previous thread - the precise chapter you need to read in the Manual:
Andy Neil said:
The calling convention, etc, will be in the compiler Manual.
(if you're using Keil, the C51 Manual has a whole section specifically titled "Interfacing 'C' and assembler")

Oh well, now you have a 2nd opinion:
Michael Karas said:
Read the Keil C51 compiler users manual. This information is fully described there.


...and a third:
Oleg Sergeev said:
Read chapter "Interfacing C Programs to Assembler" in C51.pdf.


Anyway, the best way to proceed is to create a "dummy" function in 'C', get the compiler to convert it to assembler, then fill in your details in assembly.
Obviously, the 'C' compiler knows how to pass parameters, etc - so just let it show you!

But you should still read that Manual - then you will not only see what's going on, but also be able to understand it!

List of 6 messages in thread
TopicAuthorDate
Passing arguments between c and assemble            01/01/70 00:00      
   RE: Passing arguments between c and assemble            01/01/70 00:00      
   RE: Passing arguments between c and assemble            01/01/70 00:00      
   Three Times now!            01/01/70 00:00      
      actually, four!            01/01/70 00:00      
   RE: Exactly!! Four to the letter!!            01/01/70 00:00      

Back to Subject List