Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About cis

  • Rank
  1. I was very surprised that "volatile" key word is not supported it is use in other compiler to specify that a variable can be modified at any time (in interrupt particulary) and so when a test use this variable, the test must be performed even if you write things like that : unsigned char test; // global variable main() { portb=1; test =1; while(1) { if (test==0) portb=0; } } normally a compiler like GCC will optimise and don t create assembler code for last instruction that is never reach. but if you specify that your variable is volatile even if you are in high optimization level, the test will be performed (just imagine that your interrupt is use to force test =0;) is it possible that this keyword appear in next version of compiler
  • Create New...