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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/11/08 20:40
Read: times


 
#158206 - incorrect code in a different place?
Responding to: ???'s previous message
I agree that this function (which as I understand it, did not have any using directive) has no bad code. The compiler assumed the function to use register bank 0 correctly (IMHO).

But shouldn't the compiler also generate code in the ISR (using bank 2) to change the register bank back to 0 before it calls this function?

I think the only way the compiler should create a problem is if you put the function in a separate source from the ISR and give the function implementation a using directive but forget that in the prototype you give to the ISR. Now if both objects forwarded the used register bank to the linker, the linker could still issue a warning or error.

Any feedback from Keil yet?

Greets,
Maarten

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