SX User’s Manual Rev. 3.1 86 © 2000 Scenix Semiconductor, Inc. All rights reserved. Chapter 3 Instruction Set 3.6.17    JMP addr9 Jump to Address Operation: PC(7:0) = addr9(7:0) program counter (8) = addr9(8) program counter (11:9) = PA2:PA0 Bits affected: none Opcode: 101k kkkk kkkk Description: This instruction causes the program to jump to a specified address. It loads the pro-
gram counter with the new address. The new 12-bit address is generated from two
different sources. Bits 8:0 come from the 9-bit constant value in the instruction and
bits 11:9 come from the PA2:PA0 bits in the STATUS register. The STATUS reg-
ister must contain the appropriate value prior to the jump instruction.
Cycles: 2 in “compatible” mode (SX18/20/28AC and SX18/20/28AC75 only), or 3 in “tur-
bo” mode
Example: page $600 ;set page of jump addr. in STATUS reg. snb $03.0 ;test carry bit and skip if clear jmp overflo ;jump to overflo routine if C=1 ... ;more of program (not shown) overflo ; mov W,$09 ;routine executed if C=1 ... This  example  shows  one  way  to  implement  a  conditional  jump.  The  “jmp”
instruction, if executed, causes a jump to the address of the “overflo” program label.
The “snb” instruction (test bit and skip if clear) causes the “jmp” instruction to be
either executed or skipped, depending on the state of the carry bit.
The PA2:PA0 bits of the STATUS register must contain the three high-order bits
(bits 11:9) of the “overflo” routine address prior to the “jump” instruction. This is
the purpose of the “page” instruction.