GOTO

Unconditional Branch

GOTO is an unconditional branch. The eleven-bit immediate value is loaded into PC bits <10:0>. The upper bits of PC are loaded from PCLATH<4:3>. GOTO is a two-cycle instruction.

[the_ad id="3059"]

Syntax:

[ label ] GOTO k

Operation:

k → PC<10:0>
PCLATH<4:3> → PC<12:11>

Operands:

  • k is from 0 to 2047

Status Affected: None

Example:

GOTO SUB1

[the_ad id="3059"]

Example:

GOTO 0x02