SX Users Manual Rev. 3.1
© 2000 Scenix Semiconductor, Inc. All rights reserved.
Chapter 3 Instruction Set
3.6.17 JMP addr9
Jump to Address
PC(7:0) = addr9(7:0)
program counter (8) = addr9(8)
program counter (11:9) = PA2:PA0
101k kkkk kkkk
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.
2 in compatible mode (SX18/20/28AC and SX18/20/28AC75 only), or 3 in tur-
;set page of jump addr. in STATUS reg.
;test carry bit and skip if clear
;jump to overflo routine if C=1
;more of program (not shown)
;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.