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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/13/09 14:13
Read: times


 
#163425 - register bank, ar4?
Responding to: ???'s previous message
The "orl ar4,#0x08" in the SDCC is confusing. If ar4 is the absolute address of register r4, then the code will work only in one out of four register banks. It works in Bank 0 only, can be seen by the opcode created.

The first line "bMODECNFG |= MODECNFG_CLKOUTEN;" creates code using R4.
The second line "bMODECNFG |= MODECNFG_CLKSLCT;" creates code using AR4.

Either there is insufficent knowledge how to use SDCC or it's a bug, I do not know.

Or, if the compiler is so smart, that it knows that the function is used in bank 0 only?






List of 26 messages in thread
TopicAuthorDate
SDCC and Keil and I/O            01/01/70 00:00      
   No big changes for SDCC            01/01/70 00:00      
   Nothing obvious            01/01/70 00:00      
   just curious            01/01/70 00:00      
      Just what do you mean, Erik?            01/01/70 00:00      
         even the SDCC 'friends' agree            01/01/70 00:00      
         Answers to your quiz            01/01/70 00:00      
            5th            01/01/70 00:00      
            But the really difficult question is...            01/01/70 00:00      
      Thanks! and a bit of background            01/01/70 00:00      
         Am I going crazy?            01/01/70 00:00      
         Is the code large then 2K?            01/01/70 00:00      
            Keil deserves a medal if it is using USB in less than 2kB            01/01/70 00:00      
               Keil probably has nothing to do with the USB?            01/01/70 00:00      
                  If only it where that simple            01/01/70 00:00      
                  TUSB3410            01/01/70 00:00      
         Test costs?            01/01/70 00:00      
   Initially maintain a compatible source            01/01/70 00:00      
      But            01/01/70 00:00      
   Can you have a look at this?            01/01/70 00:00      
      use "__xdata volatile unsigned char __at(0xfffb) bMODECNF"            01/01/70 00:00      
         Done!            01/01/70 00:00      
            thanks            01/01/70 00:00      
      register bank, ar4?            01/01/70 00:00      
   A free 3-month full Keil PK51 licence            01/01/70 00:00      
      Thanks for the link!            01/01/70 00:00      

Back to Subject List