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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/18/04 14:27
Read: times


 
#66977 - RE: Selecting register banks
Responding to: ???'s previous message
If you really really need to load R4 then it will be necessary to use either in line assembler or get rid of C for this module and actually use assembly language.

First DO NOT DO THIS, you can never be sure what a C compiler uses for operations. as an example, you load something into R14 and than have an interrupt using RB1 and all works beautifully. Then you upgrade your compiler and your program blows to kingdom come because the newer version makes more efficient use of registers.

However, should you decide to ignore all warnings a way to do it would be to define a data variable in assembler at location 8+4 and declare it external to your C.

In some cases where I have to do heavy debugging I declare my xdata buffers in an assembler module just to keep them on neat boundaries.

Erik


List of 5 messages in thread
TopicAuthorDate
Selecting register banks            01/01/70 00:00      
   RE: Selecting register banks            01/01/70 00:00      
      RE: Selecting register banks            01/01/70 00:00      
         RE: Selecting register banks            01/01/70 00:00      
            RE: Selecting register banks            01/01/70 00:00      

Back to Subject List