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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/21/02 15:18
Read: times


 
#23201 - RE: bug with 8252 and keil 6.23 or what ?
"Thanx Andy, does this mean I have to do it in assembly or shall i be quite about it for now coz the program worked ?"

For this sort of thing, assembler is the safest because you're in full control.
Just because it works now doesn't mean it'll always work; it is not necessarily "safe"
There is no guarantee that a Compiler will emit any specific machine instructions in any specific order; so you could find that you just tweak an option, and it could all stop working (eg, a different optimiser setting).
In particular, things could well go wrong if you change compiler version!

You should check the generated assembler; if it really is doing what you want, you could consider "protecting" it with something like this:
#if( __C51__==623 )
// Code tested with C51 v6.23
ES   =   0; // Disable interrupts 
ACC  = 'M'; 
TB8  =  ~P; 
SBUF = 'M'; 
#else
#error Code not tested with this compiler version!
#endif 


List of 6 messages in thread
TopicAuthorDate
bug with 8252 and keil 6.23 or what ?            01/01/70 00:00      
RE: bug with 8252 and keil 6.23 or what ?            01/01/70 00:00      
RE: bug with 8252 and keil 6.23 or what ?            01/01/70 00:00      
RE: bug with 8252 and keil 6.23 or what ?            01/01/70 00:00      
RE: bug with 8252 and keil 6.23 or what ?            01/01/70 00:00      
RE: bug with 8252 and keil 6.23 or what ?            01/01/70 00:00      

Back to Subject List