A simplified ARM programmer’s model is provided in this section.
Register File. In the ARM
processor, 16 general purpose registers are available at any time.
Each register is 32-bit in size. The registers are referred to as
rn, where n represents the register
index. All instructions treat registers r0 to r13 equally.
Any operation that can be performed on r0 can be performed equally well on registers
r1 to r13. But r14 and
r15 are assigned special functions by
the processor. r15 is the program
counter, and contains the address of the next instruction to be
fetched. r14 is the link register, and
used to store the return address, when a subroutine is invoked.
![]() |
Tip |
|---|---|
|
Though register |
Current Program
Status Register. The Current Program Status Register
(cpsr) is a dedicated 32-bit register,
that contains the following fields.
Only the condition flags field will be used in the examples provided in this tutorial. And hence only the condition flags will be elaborated here.
The condition flags indicates the various conditions that occur while performing arithmetic and logical operations. The various condition flags and their meaning are given in the following table.
Table A.1. Condition Flags
| Flag | Meaning |
|---|---|
|
Carry |
Operation caused a carry. |
|
Overflow |
Operation caused an overflow. |
|
Zero |
Operation resulted in 0. |
|
Negative |
Operation resulted in a negative value. |