
2.2 ARM Processor 61
2.2.2 Data Operations
Arithmetic and logical operations in C are performed in variables. Variables are
implemented as memory locations. Therefore, to be able to write instructions to
perform C expressions and assignments, we must consider both arithmetic and
logical instructions as well as instructions for reading and wr iting memory.
Figure 2.7 shows a sample fragment of C code with data declarations and several
assignment statements. The varia bles a, b, c, x, y, and z all become data locations
in memory. In most cases data are kept relatively separate from instructions in the
program’s memory image.
In the ARM processor, arithmetic ...