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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/18/03 01:03
Read: times


 
#60911 - RE: RTFM!
Responding to: ???'s previous message
Trying to find out how to assign a variable at a perticular location, and it should be accessed by C as well as assembly code.


Why does it have to be at a particular location?

Anyway, if you want it to be accessible to 'C', you must follow the C51 conventions of byte ordering, etc.

Then all you need to do is define it as PUBLIC in your assembler, and have a corresponing 'extern' declaration in 'C'
'C' neither knows nor cares that it actually came from an assembler PUBLIC!

Alternatively, write a little "translation" function in assembler. This must follow the C51 calling & return-value conventions, but internally (in assembler) can do whatever bizarre actions are necessary to access your arcane assembler data!

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