FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
C++
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
May 01, 2005

Register Access in C++

(Page 14 of 15)

May, 2005: Register Access in C++

Using volatile

This low-level purgatory is where you use C's volatile keyword. volatile signals to the compiler that a value may change under the code's feet, that you can make no assumptions about it, and that the optimizer can't cache it for repeated use.

This is just the behavior you need for hardware register access. Every time you write code that accesses a register, you want it to result in a real register access. Don't forget the volatile qualification!

Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK