arithmetic instructions Flashcards
1
Q
< operation >
A
2
Q
< operation >
ADC – Add with Carry
A
Rd := Rn + Operand2 + Carry
3
Q
< operation >
SUB – Subtract
A
Rd := Rn − Operand2
4
Q
< operation >
SBC – Subtract with Carry
A
Rd := Rn − Operand2 − NOT(Carry)
5
Q
< operation >
RSB – Reverse Subtract
A
Rd := Operand2 − Rn
6
Q
< operation >
RSC – Reverse Subtract with Carry
A
Rd := Operand2 − Rn − NOT(Carry)
7
Q
ADD r0, r1, r2
A
R0 = R1 + R2
8
Q
SUB r5, r3, #10
A
R5 = R3 − 10
9
Q
RSB r2, r5, #0xFF00
A
R2 = 0xFF00 − R5
10
Q
RSB and RSC subtract in _____ order (e.g. y – x not x – y).
A
RSB and RSC subtract in reverse order (e.g. y – x not x – y).
11
Q
There is no divide instruction –
A
There is no divide instruction – the compiler uses a run-time library function or shifts to perform division.
12
Q
A