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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/21/08 00:15
Read: times


 
#157604 - This is what Keil does
Responding to: ???'s previous message
This is the way Keil works, and I doubt they are ever likely to change it. Their use of absolute register addresses can very easily go wrong if you call functions from an ISR.

In fact I made a post covering some of this over a year ago:

http://www.8052.com/forum/read.phtml?id=133276

The relevant section is:

Chris Kelly said:
Because once you have multiple register sets in use it becomes very difficult to manage assignment of register sets to functions. And if you want to have a common function, callable from different register set functions, then it's impossible with absolute register addressing turned on.

And the worst bit is that even though the compiler knows that FuncA using register set 1 is directly calling FuncB with register set 2 it doesn't even issue a warning! It just generates code that doesn't work!

So the result of this is that I always turn absolute register addressing off.

List of 18 messages in thread
TopicAuthorDate
Keil C51 Compiler Bug            01/01/70 00:00      
   version?            01/01/70 00:00      
      Version            01/01/70 00:00      
   This is what Keil does            01/01/70 00:00      
      not if you follow thw rules            01/01/70 00:00      
         And also call from elsewhere?            01/01/70 00:00      
            Revision...            01/01/70 00:00      
         Using 2            01/01/70 00:00      
            did you have using 2 in the function header ?            01/01/70 00:00      
               Using 2            01/01/70 00:00      
                  correct cde ----            01/01/70 00:00      
                     Using 2            01/01/70 00:00      
                        people like it working            01/01/70 00:00      
                           Eee PC?            01/01/70 00:00      
                           HiTech vs Keil            01/01/70 00:00      
                              yes            01/01/70 00:00      
                           OCG C compiler for 8051            01/01/70 00:00      
                     incorrect code in a different place?            01/01/70 00:00      

Back to Subject List