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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/20/03 22:52
Read: times


 
#46176 - RE: SDCC, large mem model, code inefficiency
Responding to: ???'s previous message
"I imagine Keil does it the same way."

It does.

Any 'C' compiler will have to generate code to initialise RAM variables, and this code will have to be executed on every call to the function for automatic variables! (like this one).

To avoid this, If the message is constant, put it into CODE space.

BTW: a quick look at the Programmer's Guide showed that, although INC DPTR takes less code than MOV DPTR,#data16, the execution time is the same.
Perhaps that's why SDCC thought the MOV was OK?

List of 8 messages in thread
TopicAuthorDate
SDCC, large mem model, code inefficiency            01/01/70 00:00      
   RE: SDCC, large mem model, code inefficiency            01/01/70 00:00      
   RE: SDCC, large mem model, code inefficiency            01/01/70 00:00      
      RE: SDCC, large mem model, code inefficiency            01/01/70 00:00      
      RE: SDCC, large mem model, code inefficiency            01/01/70 00:00      
   RE: Compiler hacking? VFM?            01/01/70 00:00      
   RE: SDCC, large mem model, code inefficiency            01/01/70 00:00      
   Thanks for all the responses...            01/01/70 00:00      

Back to Subject List