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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/17/03 23:13
Read: times


 
#60904 - RE: Asm variables from C keil off topic
Responding to: ???'s previous message
Hi Sachin,

You've got a pretty hopeless situation there. The C compiler allows assembler functions, but using C functions on an assembly program, especially one not written with that in mind, is an entirely different thing. If you read the manual as has been suggested, you'll see the C function calling conventions that you will have to duplicate in assembler in order for anything to begin working. I don't know if the Keil linker can do what you are trying to do anyway.

Your best bet perhaps is to make a dummy program to call the C function, all in C, then take the compiler generated assembler (or rather the pieces of it you need) and link that in with your assembler program. It's still an all-assembler program, but you've used a compiler to help you out with some of the coding.

What *really* needs to be done is the whole project rewritten from scratch, with the necessary comments, so that it is maintainable. Rewriting from scratch might be easier than trying to work on such poorly written code, where you have to reverse-engineer it anyway to figure out what it's doing since there aren't any usable comments to help you out.

Good luck!

Dennis


List of 18 messages in thread
TopicAuthorDate
Asm variables from C keil            01/01/70 00:00      
   Answer already on Keil forum            01/01/70 00:00      
      RE: Answer already on Keil forum            01/01/70 00:00      
   RE: Asm variables from C keil            01/01/70 00:00      
      Cross-posting            01/01/70 00:00      
   RE: Asm variables from C keil            01/01/70 00:00      
      RE: Asm variables from C keil            01/01/70 00:00      
         RE: Asm variables from C keil            01/01/70 00:00      
            RE: Asm variables from C keil            01/01/70 00:00      
               RE: Asm variables from C keil            01/01/70 00:00      
                  RE: Asm variables from C keil            01/01/70 00:00      
      RTFM!            01/01/70 00:00      
         RE: RTFM!            01/01/70 00:00      
            RE: RTFM!            01/01/70 00:00      
               RE: RTFM!            01/01/70 00:00      
                  Dont do it!            01/01/70 00:00      
   RE: Asm variables from C keil off topic            01/01/70 00:00      
      RE: Asm variables from C keil off topic            01/01/70 00:00      

Back to Subject List