EasyManua.ls Logo

Espressif ESP32-S2 - Page 1491

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 4. API Guides
1: OR R1, R2, R3 //R1 = R2 \| R3
2: OR R1, R2, 0x1234 //R1 = R2 \| 0x1234
3: .set value1, 0x03 //constant value1=0x03
OR R1, R2, value1 //R1 = R2 \| value1
4: .global label //declaration of variable label
OR R1, R2, label //R1 = R2 \|label
...
label: nop //definition of variable label
LSH - Logical Shift Left
Syntax LSH Rdst, Rsrc1, Rsrc2
LSH 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 shift to left of source register to number of bits from another source register
or 16-bit signed value and store result to the destination register.
Examples:
1: LSH R1, R2, R3 //R1 = R2 << R3
2: LSH R1, R2, 0x03 //R1 = R2 << 0x03
3: .set value1, 0x03 //constant value1=0x03
LSH R1, R2, value1 //R1 = R2 << value1
4: .global label //declaration of variable label
LSH R1, R2, label //R1 = R2 << label
...
label: nop //definition of variable label
RSH - Logical Shift Right
Syntax RSH Rdst, Rsrc1, Rsrc2
RSH 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 shift to right of source register to number of bits from another source
register or 16-bit signed value and store result to the destination register.
Examples:
1: RSH R1, R2, R3 //R1 = R2 >> R3
2: RSH R1, R2, 0x03 //R1 = R2 >> 0x03
3: .set value1, 0x03 //constant value1=0x03
RSH R1, R2, value1 //R1 = R2 >> value1
4: .global label //declaration of variable label
(continues on next page)
Espressif Systems 1480
Submit Document Feedback
Release v4.4

Table of Contents