bcond


-

The bcond instructions of the device should be specified in the following formats.

-

Bcond disp9

-

Bcond disp17

 

-

In asrh, the following formats can also be used in addition to the above.

-

bcond9 disp9

-

bcond17 disp17

-

jcond disp9

-

jcond9 disp9

-

jcond17 disp17

-

jbr disp

 

-

bcond9 or bcond17 should be specified when output should be with a fixed disp width at all times. These instructions will not be expanded.

-

jcond, jcond9, and jcond17 have the same meaning as bcond, bcond9, and bcond17, respectively.

-

jbr has the same meaning as br.

-

Code that can be specified in cond is shown in "Table 5.28 bcond Instruction".

Table 5.28

bcond Instruction

Instruction

Flag Condition

Meaning of Flag Condition

bgt

( (S xor OV) or Z) = 0

Greater than (signed)

bge

(S xor OV) = 0

Greater than or equal (signed)

blt

(S xor OV) = 1

Less than (signed)

ble

( (S xor OV) or Z) = 1

Less than or equal (signed)

bh

(CY or Z) = 0

Higher (Greater than)

bnl

CY = 0

Not lower (Greater than or equal)

bl

CY = 1

Lower (Less than)

bnh

(CY or Z) = 1

Not higher (Less than or equal)

be

Z = 1

Equal

bne

Z = 0

Not equal

bv

OV = 1

Overflow

bnv

OV = 0

No overflow

bn

S = 1

Negative

bp

S = 0

Positive

bc

CY = 1

Carry

bnc

CY = 0

No carry

bz

Z = 1

Zero

bnz

Z = 0

Not zero

br

---

Always (Unconditional)

bsa

SAT = 1

Saturated

-

The bt and bf instructions cannot be specified in asrh.

-

If the following is specified for disp22, the assembler executes instruction expansion and generates one or more machine-language instructions.

(a)

Absolute expression having a value exceeding the range of -256 to +255 but within the range of -65,536 to +65,535 or a relative expression having a PC offset reference of label with a definition in the same section of the same file as this instruction and having a value exceeding the range of -256 to +255 but within the range of -65,536 to +65,535

br      disp17
jr      disp17
bcond   disp17
bcond   disp17

(b)

Absolute expression having a value exceeding the range of -65,536 to +65,535 but within the range of -2,097,150 to +2,097,153Note 1, a relative expression having a PC offset reference of label with a definition in the same section of the same file as this instruction and having a value exceeding the range of -65536 to +65535, or a relative expression having a PC offset reference of label without a definition in the same file or section as this instruction.

br     disp22
jr      disp22
bsa    disp22
    bsa     Label1
    br      Label2
Label1:
    jr      disp22 - 4
Label2:
bcond   disp22
bncond      LabelNote 2
    jr      disp22 - 2
Label:

Note 1.

The range of -2,097,150 to +2,097,153 applies to instructions other than br and bsa. The range for the br instruction is from -2,097,152 to +2,097,151, and that for the bsa instruction is from -2,097,148 to +2,097,155.

Note 2.

bncond denotes an instruction that effects control of branches under opposite conditions, for example, bnz for bz or ble for bgt.