On 01/12/2011 21:40, Georg-Johann Lay wrote:

> It's not unusual because:
> 
> * It's not unusual to write down SFRs as violatile memory like
>   (*((volatile unsigned int*) 0x1234)) or as a cast to a composite
>   that reflects the SFRs bit(field)s.
> 
> * It's not unusual that microcontrollers can access specific parts
>   of memory -- in particular I/O -- with special instructions.

  Great.  Now I'm going to be hearing Tom Jones in my head for the rest of the
day!  :)

(ObTopic: Andrew H's definition of volatile is completely right AIUI and the
case reported by Peter B is definitely a very bad bug.  Volatile operations
are externally visible and must be executed in source-code order.)

    cheers,
      DaveK

Reply via email to