Chapter 4. API Guides
.text
MOVE
MOVE
STL
3:
MOVE
STL
STH –Store data to the high 16 bits of 32-bits memory
Syntax STH 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 high half-word of memory with address
Rdst+offset:
Mem[Rdst
+
offset
Mem[Rdst
+
offset
Examples:
1:
STH
R1, R2,
2:
.data
Addr1:
.word
.set
.text
MOVE
MOVE
STH
3:
MOVE
STH
STO –Set offset value for auto increment operation
Syntax STO offset
Operands
• Offset –11-bit signed value, offset in bytes
Cycles 4 cycles to execute, 4 cycles to fetch next instruction
Description The instruction set 16-bit value to the offset register:
offset
= value/
Examples:
1:
STO
0x12
2:
.data
Addr1:
.word
.set
Espressif Systems
//Text section definition
R1,
1
//
R1
R2, Addr1
//
R2
R1, R2, offs
//
MEM[R2
//
MEM[Addr1
R1,
1
//
R1, R2,
0x12,1
//
/
4]{31:16}
=
{Rsrc[15:0]}
/
4]{31:16}
=
{Label[1:0],Rsrc[13:0]}
0x12
//MEM[R2+0x12][31:16]
//Data section definition
123
//
Define label Addr1
offs,
0x00
//
Define constant offs
//Text section definition
R1,
1
//
R1
R2, Addr1
//
R2
R1, R2, offs
//
MEM[R2
//
MEM[Addr1
R1,
1
//
R1, R2, 0x12,
1
//MEM[R2+0x12] 0x4001xxxx
4
//
Offset
//Data section definition
123
//
Define label Addr1
offs,
0x00
//
Define constant offs
Submit Document Feedback
=
1
=
Addr1
+
0]
=
R1
+
0] will be
R1
=
1
MEM[R2+0x12] 0xxxxx4001
=
R1
16
bit
=
1
=
Addr1
+
0]
=
R1
+
0] will be
R1
=
1
=
0x12/4
16
bit
1482
(continued from previous page)
32'hxxxx0001
32'h0001xxxx
(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