Literal addressing
The easiest addressing mode is literal addressing. Instead of saying where an operand is in memory, you provide the operand in an instruction (i.e., this is literally the value). Other addressing modes require you to specify where an operand is in memory. Consider the following Python expression, which has two literals, 30 and 12:
if A > 30: B =
12
We can express this fragment of Python in ARM assembly language as follows:
@ Register r0 is A and r1 is B
cmp r0,#30 @ Compare A with 30
ble Exit @ If A ≤ 30, skip the next operation
mov r1,#12 ...