Chapter 4. API Guides
Description The instruction subtracts the source register from another source register or subtracts 16-bit signed
value from a source register, and stores result to the destination register.
Examples:
1:
SUB R1, R2, R3
2:
sub R1, R2,
3:
.set value1,
SUB R1, R2, value1
4:
.global
label
SUB R1, R2, label
....
label:
nop
AND - Logical AND of two operands
Syntax AND Rdst, Rsrc1, Rsrc2
AND Rdst, Rsrc1, imm
Operands
• Rdst - Register R[0..3]
• Rsrc1 - Register R[0..3]
• Rsrc2 - Register R[0..3]
• Imm - 16-bit signed value
Cycles 2 cycles to execute, 4 cycles to fetch next instruction
Description The instruction does logical AND of a source register and another source register or 16-bit signed value
and stores result to the destination register.
Examples:
1:
AND R1, R2, R3
2:
AND R1, R2,
3:
.set value1,
AND R1, R2, value1
4:
.global
label
AND R1, R2, label
...
label:
nop
OR - Logical OR of two operands
Syntax OR Rdst, Rsrc1, Rsrc2
OR Rdst, Rsrc1, imm
Operands
• Rdst - Register R[0..3]
• Rsrc1 - Register R[0..3]
• Rsrc2 - Register R[0..3]
• Imm - 16-bit signed value
Cycles 2 cycles to execute, 4 cycles to fetch next instruction
Description The instruction does logical OR of a source register and another source register or 16-bit signed value
and stores result to the destination register.
Examples:
Espressif Systems
//R1
0x1234
//R1
0x03
//constant
//R1
//declaration of variable label
//R1
//definition of variable label
//R1
=
R2
0x1234
//R1
=
R2
0x03
//constant
//R1
=
R2
//declaration of variable label
//R1
=
R2
//definition of variable label
1479
Submit Document Feedback
=
R2
-
R3
=
R2
-
0x1234
value1=0x03
=
R2
-
value1
=
R2
-
label
&
R3
&
0x1234
value1=0x03
&
value1
&
label
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?
Questions and answers