JMP

 

JMP        addr9                Jump to address


Words:        1        Cycles:        2                Affects:        none

 

Operation:        The lower 9-bits of the literal addr9 is moved into the program counter. The upper bits of the Program counter are loaded from  bits 3 & 4 of PCLATH.

 

Coding:        GOTO        addr9

 

 

JMP        PC+W                Jump to PC+W


Words:        1        Cycles:        2                Affects:        C, DC, Z

 

Operation:        W+1 is added into the program counter. The 9th bit of the program counter is always cleared to 0, so the jump destination will be in the first 256 words of any 512-word page. This instruction is useful for jumping into lookup tables comprised of RETW data, or jumping to particular routines. The flags are set as they would be by an ADD instruction.

 

Coding:        ADDWF        2,1

 

 

JMP        W        Jump to W


Words:        1        Cycles:        2                Affects:        none

 

Operation:        W is moved into the program counter. The 9th bit of the program counter is always cleared to 0, so the jump destination will be in the first 256 words of any 512-word page. This instruction is useful for jumping into lookup tables comprised of RETW data, or jumping to particular routines.

 

Coding:        MOVWF                2