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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/16/06 13:34
Read: times


 
Msg Score: +1
 +1 Informative
#110139 - push/pop in isr
Responding to: ???'s previous message
Bernd Nollmeyer said:
Saving the register inside ISR is not neccesary but as you can imagine I use this code also in other projects so its universal.

Generally, this is many times a problem, how to make a program in such way that extensions to it added later when the thorough knowledge of the details already faded out (or by somebody who never had that "thorough knowledge") would not make any harm.

Therefore some assumptions are often made, one example of them is that a basic set of registers (accumulator, PSW) is free to be used throughout the program (implying they are pushed in ISRs).

This is always a tradeoff, and the best example of it is the usage of high level languages, where their formalism prevents a lot of errors, but the price for it is the less efficient usage of resources.

So, if you want to make your ISRs "foolproof", you push registers like crazy. If you want to be super-efficient, you omit the pushes unless absolutely necessary. In between, you might leave the pushes where they are and place a semicolon before them to comment them out, perhaps also adding a note to remind the reader to un-comment them when needed.

0.20 SKK

Jan Waclawek


List of 31 messages in thread
TopicAuthorDate
help on serial communication            01/01/70 00:00      
   OK            01/01/70 00:00      
   Check this            01/01/70 00:00      
      Writing to SBUF            01/01/70 00:00      
         where?            01/01/70 00:00      
            Link            01/01/70 00:00      
               Where did he call it "tutorial" in his p            01/01/70 00:00      
         Loop back            01/01/70 00:00      
         SBUF            01/01/70 00:00      
         formally, yes            01/01/70 00:00      
   some books            01/01/70 00:00      
      A little more detail?            01/01/70 00:00      
         Andy, have a look at BOOKS on the left            01/01/70 00:00      
            If a poster assumes that everybody has            01/01/70 00:00      
               I have not read the books, but...            01/01/70 00:00      
               Yes, but            01/01/70 00:00      
   here we are            01/01/70 00:00      
      Tautology            01/01/70 00:00      
      Formatted            01/01/70 00:00      
      about code            01/01/70 00:00      
   about the code            01/01/70 00:00      
      push/pop in isr            01/01/70 00:00      
         the most often forgotten push/pop            01/01/70 00:00      
   hi            01/01/70 00:00      
   about the code            01/01/70 00:00      
      this can NOT be your question, elaborate            01/01/70 00:00      
         re: about the code            01/01/70 00:00      
            Serial EEPROM            01/01/70 00:00      
               Yes Jon            01/01/70 00:00      
               re more            01/01/70 00:00      
            sometimes the simple becomes complex            01/01/70 00:00      

Back to Subject List