Chapter 4. API Guides
Description The instruction makes jump to the specified address. Jump can be either unconditional or based on an
ALU flag.
Examples:
1:
JUMP
32-bit words)
→
2:
JUMP
result
is
zero
→
3:
JUMP
...
label:
nop
4:
.global
MOVE
JUMP
...
label:
nop
JUMPR –Jump to a relative offset (condition based on R0)
Syntax JUMPR Step, Threshold, Condition
Operands
• Step –relative shift from current position, in bytes
• Threshold –threshold value for branch condition
• Condition:
– EQ (equal) –jump if value in R0 == threshold
– LT (less than) –jump if value in R0 < threshold
– LE (less or equal) –jump if value in R0 <= threshold
– GT (greater than) –jump if value in R0 > threshold
– GE (greater or equal) –jump if value in R0 >= threshold
Cycles Conditions EQ, GT and LT: 2 cycles to execute, 2 cycles to fetch next instruction
Conditions LE and GE are implemented in the assembler using two JUMPR instructions:
//
JUMPR target, threshold, LE
JUMPR target, threshold, EQ
JUMPR target, threshold, LT
//
JUMPR target, threshold, GE
JUMPR target, threshold, EQ
JUMPR target, threshold, GT
Therefore the execution time will depend on the branches taken: either 2 cycles to execute + 2 cycles to fetch,
or 4 cycles to execute + 4 cycles to fetch.
Description The instruction makes a jump to a relative address if condition is true. Condition is the result of
comparison of R0 register value and the threshold value.
Examples:
1:pos:
JUMPR
value
in
R0
>=
20
→
2:
//
Down counting loop using R0 register
MOVE
label:
SUB
Espressif Systems
R1
//
Jump to address
0x120, EQ
//
Jump to address
label
//
Jump to label
//
Definition of label
label
//
Declaration of
R1, label
//
R1
R1
//
Jump to label
//
Definition of label
is
implemented as:
is
implemented as:
16, 20, GE
//
Jump to address (position
R0,
16
//
load
R0, R0,
1
// R0--
1486
Submit Document Feedback
in
R1 (address
0x120
(in
global
label
=
label (value loaded into R1
16
into R0
in
R1
is
in␣
bytes)
if
ALU␣
is in
words)
+
16
bytes)
if␣
(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