Chapter 4. API Guides
RSH R1, R2, label
label:
nop
MOVE –Move to register
Syntax MOVE Rdst, Rsrc
MOVE Rdst, imm
Operands
• Rdst –Register R[0..3]
• Rsrc –Register R[0..3]
• Imm –16-bit signed value
Cycles 2 cycles to execute, 4 cycles to fetch next instruction
Description The instruction move to destination register value from source register or 16-bit signed value.
Note that when a label is used as an immediate, the address of the label will be converted from bytes to words.
This is because LD, ST, and JUMP instructions expect the address register value to be expressed in words
rather than bytes. To avoid using an extra instruction
Examples:
1:
MOVE
2:
MOVE
3:
.set
MOVE
4:
.global
MOVE
...
label:
nop
STL/ST –Store data to the low 16 bits of 32-bits memory
Syntax ST Rsrc, Rdst, offset, Label STL Rsrc, Rdst, offset, Label
Operands
• Rsrc –Register R[0..3], holds the 16-bit value to store
• Rdst –Register R[0..3], address of the destination, in 32-bit words
• Offset –11-bit signed value, offset in bytes
• Label –2-bit user defined unsigned value
Cycles 4 cycles to execute, 4 cycles to fetch next instruction
Description The instruction stores the 16-bit value of Rsrc to the lower half-word of memory with address
Rdst+offset:
Mem[Rdst
+
offset
Mem[Rdst
+
offset
The ST command introduced to make compatibility with previous versions of UPL core. The application can
use higher 16 bits to determine which instruction in the ULP program has written any particular word into
memory.
Examples:
1:
STL
R1, R2,
2:
.data
Addr1:
.word
.set
Espressif Systems
//R1
//definition of variable label
R1, R2
//R1
R1,
0x03
//R1
value1,
0x03
//constant
R1, value1
//R1
label
//declaration of label
R1, label
//R1
//definition of label
/
4]{15:0}
=
{Rsrc[15:0]}
/
4]{15:0}
=
{Label[1:0],Rsrc[13:0]}
0x12
//MEM[R2+0x12]
//Data section definition
123
//
Define label Addr1
offs,
0x00
//
Define constant offs
Submit Document Feedback
=
R2
>>
label
=
R2
=
0x03
value1=0x03
=
value1
=
address_of(label)
=
R1
16
bit
1481
(continued from previous page)
/
4
(continues on next page)
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