Instruction Set Architecture—IP2022 User’s Manual 168 www.ubicom.com Example: snb    STATUS,0;skip if carry clear
page  0x6000;set page bits
jmp    overflo;jump to overflo
nop    ;continue here if no jump
overflo:                          ;jump destination
nop    ;continue here if jump taken
...
This  example  shows  one  way  to  implement  a
conditional    jump.    The     jmp    instruction,    if
executed, causes a jump to overflo. 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 (bit 0 of the
STATUS register). Because the skip instruction is
immediately followed by a page instruction, two
instructions (page and jmp) will be skipped if the
carry bit is clear.
The  PA2:PA0 bits of  the  STATUS  register must
hold the three high-order bits (bits 15:13) of the
word address of the overflo entry point prior to
the  jmp  instruction.  This  is  the  purpose  of  the
page instruction.