Summary
In this chapter, we’ve extended our knowledge of the ARM beyond the basic data-processing instructions we encountered in the previous chapter.
We began with the ARM’s register set, which is different from almost every other processor. RISC processors generally have 32 general-purpose registers. The ARM has only 16 registers.
Two of the ARM’s registers have a special purpose. Register r14
is called a link register and is used by the branch with link instructions to restore return addresses. Otherwise, it is a general-purpose register. Register r15
is the program counter, and that is very unusual indeed. This makes the ARM a very interesting device because you can change the program counter by operating on r15
.
We also looked at shifting operations. Shifting simply involves bits moving one or more places left or right. However, as bits are in registers or memory locations, a shift involves bits moving into one and dropping out the other. The different...