Data Processing Instructions
Data Processing Instructions
Arulalan Rajan
Dept. of E&C Engg, NITK Surathkal
Arithmetic Instructions
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Arithmetic Instructions
ADD r0, r1, r2
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Arithmetic Instructions
ADD r0, r1, r2 5KTT9GMPQYKV2NGCUG
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Arithmetic Instructions
ADD r0, r1, r2 5KTT9GMPQYKV2NGCUG
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Arithmetic Instructions
ADD r0, r1, r2 5KTT9GMPQYKV2NGCUG
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Arithmetic Instructions
ADD r0, r1, r2 5KTT9GMPQYKV2NGCUG
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Arithmetic Instructions
ADD r0, r1, r2 5KTT9GMPQYKV2NGCUG
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Arithmetic Instructions
ADD r0, r1, r2 5KTT9GMPQYKV2NGCUG
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Arithmetic Instructions
ADD r0, r1, r2 5KTT9GMPQYKV2NGCUG
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Arithmetic Instructions
ADD r0, r1, r2 5KTT9GMPQYKV2NGCUG
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Arithmetic Instructions
ADD r0, r1, r2 5KTT9GMPQYKV2NGCUG
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Arithmetic Instructions
ADD r0, r1, r2 5KTT9GMPQYKV2NGCUG
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Arithmetic Instructions
ADD r0, r1, r2 5KTT9GMPQYKV2NGCUG
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Arithmetic Instructions
ADD r0, r1, r2 5KTT9GMPQYKV2NGCUG
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Logical Operations
AND r0, r1, r2
ORR r0, r1, r2
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Logical Operations
AND r0, r1, r2
ORR r0, r1, r2 9J[5KTT9J[!
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Logical Operations
AND r0, r1, r2
ORR r0, r1, r2 9J[5KTT9J[!
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Logical Operations
AND r0, r1, r2
ORR r0, r1, r2 9J[5KTT9J[!
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Logical Operations
AND r0, r1, r2
ORR r0, r1, r2 9J[5KTT9J[!
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Logical Operations
AND r0, r1, r2
ORR r0, r1, r2 9J[5KTT9J[!
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Logical Operations
AND r0, r1, r2
ORR r0, r1, r2 9J[5KTT9J[!
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Logical Operations
AND r0, r1, r2
ORR r0, r1, r2 9J[5KTT9J[!
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Logical Operations
AND r0, r1, r2
ORR r0, r1, r2 9J[5KTT9J[!
#0&$+%CTGGSWKXCNGPVKPUVTWEVKQPU
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Register Movement
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Register Movement
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Register Movement
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Register Movement
/18/80CTGGSWKXCNGPVKPUVTWEVKQPU
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Register Movement
/18/80CTGGSWKXCNGPVKPUVTWEVKQPU
--diag_warning 1645 assembler command-line option to check when
an instruction substitution occurs
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Compare Instructions
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Compare Instructions
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Compare Instructions
4GUWNVUCTGFKUECTFGF
4GIKUVGTUCTGPQVWRFCVGF
(NCIUWRFCVGF
0<%8
%/2%/0CTGGSWKXCNGPV
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Bit Test Instructions
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Bit Test Instructions
Bitwise AND on Rn and
TST{cond} Rn, Operand 2 Operand 2
(same as ANDS)
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Bit Test Instructions
Bitwise AND on Rn and
TST{cond} Rn, Operand 2 Operand 2
(same as ANDS)
Bitwise EXOR on Rn and
TEQ{cond} Rn, Operand 2 Operand 2
(same as EORS)
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Bit Test Instructions
Bitwise AND on Rn and
TST{cond} Rn, Operand 2 Operand 2
(same as ANDS)
Bitwise EXOR on Rn and
TEQ{cond} Rn, Operand 2 Operand 2
(same as EORS)
4GUWNVUCTGFKUECTFGF
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Bit Test Instructions
Bitwise AND on Rn and
TST{cond} Rn, Operand 2 Operand 2
(same as ANDS)
Bitwise EXOR on Rn and
TEQ{cond} Rn, Operand 2 Operand 2
(same as EORS)
4GUWNVUCTGFKUECTFGF
4GIKUVGTUCTGPQVWRFCVGF
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Bit Test Instructions
Bitwise AND on Rn and
TST{cond} Rn, Operand 2 Operand 2
(same as ANDS)
Bitwise EXOR on Rn and
TEQ{cond} Rn, Operand 2 Operand 2
(same as EORS)
4GUWNVUCTGFKUECTFGF
4GIKUVGTUCTGPQVWRFCVGF
(NCIUWRFCVGF
0<
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Bit Test Instructions
Bitwise AND on Rn and
TST{cond} Rn, Operand 2 Operand 2
(same as ANDS)
Bitwise EXOR on Rn and
TEQ{cond} Rn, Operand 2 Operand 2
(same as EORS)
4GUWNVUCTGFKUECTFGF
4GIKUVGTUCTGPQVWRFCVGF
(NCIUWRFCVGF
0<
%HNCIOC[DGWRFCVGFFWTKPIECNEWNCVKQPQHQRGTCPF
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Bit Test Instructions
Bitwise AND on Rn and
TST{cond} Rn, Operand 2 Operand 2
(same as ANDS)
Bitwise EXOR on Rn and
TEQ{cond} Rn, Operand 2 Operand 2
(same as EORS)
4GUWNVUCTGFKUECTFGF
4GIKUVGTUCTGPQVWRFCVGF
(NCIUWRFCVGF
0<
%HNCIOC[DGWRFCVGFFWTKPIECNEWNCVKQPQHQRGTCPF
6'30GHHGEVQP%8
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Bit Test Instructions
Bitwise AND on Rn and
TST{cond} Rn, Operand 2 Operand 2
(same as ANDS)
Bitwise EXOR on Rn and
TEQ{cond} Rn, Operand 2 Operand 2
(same as EORS)
4GUWNVUCTGFKUECTFGF
4GIKUVGTUCTGPQVWRFCVGF
(NCIUWRFCVGF
0<
%HNCIOC[DGWRFCVGFFWTKPIECNEWNCVKQPQHQRGTCPF
6'30GHHGEVQP%8
6JGPYJCVKUVJGWUGQH6'3!!
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Control Flow Instructions
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Control Flow Instructions
Do not process data
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Control Flow Instructions
Do not process data
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Control Flow Instructions
Do not process data
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Control Flow Instructions
Do not process data
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Control Flow Instructions
Do not process data
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Control Flow Instructions
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Control Flow Instructions
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Control Flow Instructions
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Control Flow Instructions
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Condition 1 0 1 L 24 bit singed word Offset
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Control Flow Instructions
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Condition 1 0 1 L 24 bit singed word Offset
0 = Branch
1 = Branch
with Link
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Control Flow Instructions
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Condition 1 0 1 L 24 bit singed word Offset
0 = Branch
1 = Branch
with Link
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Control Flow Instructions
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Condition 1 0 1 L 24 bit singed word Offset
0 = Branch
1 = Branch
with Link
B{L}{<cond>} <target_address>
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN
Control Flow Instructions
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Condition 1 0 1 L 24 bit singed word Offset
0 = Branch
1 = Branch
with Link
B{L}{<cond>} <target_address>
Range of branch Instructions: +/- 32MBytes
#TWNCNCP4CLCP&GRVQH'%'PII0+6-5WTCVJMCN