In Chapter 4, “Controlling Program Flow,” we learned how to branch code conditionally based on flags in the CPSR. In this chapter, we will look at how this can be generalized to all instructions.
In Chapter 1, “Getting Started,” we looked at the ARM Instruction Format and noted that nearly every instruction contains a 4-bit condition code. So far, we’ve ignored the purpose of these bits; now we’ll look at how to use them and why we want to execute instructions conditionally to reduce the number of branch instructions. We want to minimize the number ...