Specifications
gbnpk corldttbnrit Bran&es-Conditioned branches combine in one instruc-
tion
a conditional
sMp,
unconditional branch sequence.
.
Timing for the conditional branches is shown as execution time if the con-.
dition is not met, followed by the execution time if the condition is met (end
a program branch occurs).
Branch on Eauol(z.ro) BEQ IOC
~.SILS,~,~.~ILS
0 ,
,O
I I I I I I I I, I, 1
I
4
offrrt
15 6 7 0
Operation: lot + (PC) if Z = 1
Description: Tests the state of the Z-bit and causes a. branch if
Z
is set. It
is used to test equality following a CMP operation, to test that
no bits set
in the destination were also set in the source fdllowing a BIT operation,
and
generally, to test that the result of the previouq operation was zero.
Thus the sequence
CMP A,B ; compare A and B
BEQ C
; branch if they are equal
will branch to C if A = B
(A - B A 0)
and the sequence
ADD A.B ; addAtoB
BEQ C ; branch if the result = 0
will branch to C if A + B = 0.
Branch on Not EqualGk~) BNE IOC
1.5113.2.6 ILS
0 1 0
offset
I1 I I I I I I III I
1
0
15 B 7
0
Operation: lot + (PC) if Z = 0
Description: Tests the state of the Z-bit and causes a branch if the Z-bit is
clear. BNE is the complementary -operation to BEQ. It is. used to test in-
equality following a CMP, to test that some bits set in the destination were
also set in the source, following a BIT end, generally, to test that the result
of the previous operation was not zero.
Branch on Minus
BMI IQC 1.5u.s, 2.6~
1 I 0
I I
0
III
4
I Ill
offsri
II I I
15 B 7 0
Operation: lot --, (PC) if N = 1
Description: Tests the state of the’N-bit and causes a branch if N is set. It
is used to test the sign (most significant bit) of the result of the previous
operation.
Branch on PLUS
6PL IOC t.5 AU, 2.61~
0ffS.t
1 I 0
I,
0
II
0
I1 I I I I1 1
15 -. B 7 0