Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Processors execute instructions. Instructions are the basic building blocks of all computation; they perform tasks such as add numbers together, fetch data from memory, or store data back to memory. The instructions operate on registers that hold the current values of variables and other machine state. Consider the snippet of code shown in Listing 1.1, which increments an integer variable pointed to by the pointer ptr.
void func( int * ptr )
{
( *ptr )++;
} |