jpb - Boolean jump

jpb - Boolean jump

Calling Format

jpb     src, value, label

Operands

Name Description
src A Boolean register.
value true or false.
label Label name.

Overview

Causes control to jump to the address of the specified label name when the contents of the Boolean register specified by src match the value specified by value.
Unlike the call instruction, control does not return at a ret instruction. Also, you can specify labels for which ret instructions have not been set.

An error will result if you jump to an external location from within an if or loop block, or jump from an external location into an if or loop block.
An error also will result if you call this instruction immediately prior to an else, endif, endloop, or ret instruction.
Behavior is undefined if you jump to an external location from between the main and endmain labels, or from within subroutines.
In the same way, jumping to a ret instruction within a subroutine also results in undefined behavior.
Jumping to an else, endif, or endloop instruction has the same effect as jumping to the instruction immediately following that instruction.

Operation

if ( src == value )
    jump to label

Code Example

jpb     b0, true,  subfunction0
jpb     b1, false, subfunction0

subfunction0:
..

Revision History

2011/12/20
Initial version.

CONFIDENTIAL