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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/26/05 15:17
Read: times


 
#85814 - To put it the opposite way,...
Responding to: ???'s previous message
Hatem Zakaria said:
As i show pure code definition to be codes which must not be self-modifying, What i need to know is the applications in which we can use this type of code?

Ask yourself the opposite question: in what situation would you ever want to write code that did modify itself?!
Can you imagine what a nightmare it would be to debug...?! :-0

Yes, there are occasions where it's a useful technique - but you'd definitely be entering the Dragon's Lair...!
See: http://www.8052.com/forum/read.phtml?id=84596

Of course, you can't do it on an 8051 anyway - because an 8051 has no instruction to write to CODE memory!
(well, I s'pose you could do it - but then you'd need both hairy software and hairy hardware!!)

There are other reasons why reentrancy is a bad thing on 8051s...



List of 21 messages in thread
TopicAuthorDate
Pure Code            01/01/70 00:00      
   Pure Code            01/01/70 00:00      
   Pure Code            01/01/70 00:00      
      Impure code?            01/01/70 00:00      
      Pure Code            01/01/70 00:00      
         do not use the wrong processor            01/01/70 00:00      
         Awash with Pure Code examples!            01/01/70 00:00      
   Does this term have any general meaning?            01/01/70 00:00      
      Does this term have any general meaning?            01/01/70 00:00      
         OK, so what is your question?            01/01/70 00:00      
            My question            01/01/70 00:00      
               all code is pure !            01/01/70 00:00      
               To put it the opposite way,...            01/01/70 00:00      
                  Mel            01/01/70 00:00      
               applications in which we can use this            01/01/70 00:00      
               applications in which we can use this            01/01/70 00:00      
   Pure Logic            01/01/70 00:00      
   Not "Pure Code", Pure code            01/01/70 00:00      
      no local variables            01/01/70 00:00      
         Some did in the past            01/01/70 00:00      
      Nothing Special            01/01/70 00:00      

Back to Subject List