MOTOROLA
INSTRUCTION SET OVERVIEW
CPU12
5-16
REFERENCE MANUAL
5.18.3 Bit Condition Branch Instructions
These branches are taken when bits in a memory byte are in a specific state. A mask
operand is used to test the location. If all bits in that location that correspond to ones
in the mask are set (BRSET) or cleared (BRCLR), the branch is taken.
The numeric range of 8-bit offset values is $80 (
–
128) to $7F (127) from the address
of the next memory location after the offset value.
is a summary of bit-con-
dition branches.
5.19 Loop Primitive Instructions
The loop primitives can also be thought of as counter branches. The instructions test
a counter value in a register or accumulator (A, B, D, X, Y, or SP) for zero or nonzero
value as a branch condition. There are predecrement, preincrement and test-only ver-
sions of these instructions.
The numeric range of 8-bit offset values is $80 (
–
128) to $7F (127) from the address
of the next memory location after the offset value.
is a summary of loop
primitive branches.
Table 5-19 Bit Condition Branch Instructions
Mnemonic
Function
Equation or Operation
BRCLR
Branch if Selected Bits Clear
(M)
•
(mm) = 0
BRSET
Branch if Selected Bits Set
(M)
•
(mm) = 0
Table 5-20 Loop Primitive Instructions
Mnemonic
Function
Equation or Operation
DBEQ
Decrement counter and branch if = 0
(counter = A, B, D, X, Y, or SP)
(counter) – 1
⇒
counter
If (counter) = 0, then branch
else continue to next instruction
DBNE
Decrement counter and branch if
≠
0
(counter = A, B, D, X, Y, or SP)
(counter) – 1
⇒
counter
If (counter) not = 0, then branch
else continue to next instruction
IBEQ
Increment counter and branch if = 0
(counter = A, B, D, X, Y, or SP)
(counter)
+
1
⇒
counter
If (counter) = 0, then branch
else continue to next instruction
IBNE
Increment counter and branch if
≠
0
(counter = A, B, D, X, Y, or SP)
(counter)
+
1
⇒
counter
If (counter) not = 0, then branch
else continue to next instruction
TBEQ
Test counter and branch if = 0
(counter = A, B, D, X,Y, or SP)
If (counter) = 0, then branch
else continue to next instruction
TBNE
Test counter and branch if
≠
0
(counter = A, B, D, X,Y, or SP)
If (counter) not = 0, then branch
else continue to next instruction
Summary of Contents for CPU12
Page 8: ...MOTOROLA CPU12 viii REFERENCE MANUAL ...
Page 14: ...MOTOROLA INTRODUCTION CPU12 1 4 REFERENCE MANUAL ...
Page 20: ...MOTOROLA OVERVIEW CPU12 2 6 REFERENCE MANUAL ...
Page 38: ...MOTOROLA INSTRUCTION QUEUE CPU12 4 6 REFERENCE MANUAL ...
Page 300: ...MOTOROLA DEVELOPMENT AND DEBUG SUPPORT CPU12 8 16 REFERENCE MANUAL ...
Page 338: ...MOTOROLA MEMORY EXPANSION CPU12 10 8 REFERENCE MANUAL ...
Page 364: ...MOTOROLA INSTRUCTION REFERENCE CPU12 A 26 REFERENCE MANUAL ...
Page 386: ...MOTOROLA HIGH LEVEL LANGUAGE SUPPORT CPU12 C 6 REFERENCE MANUAL ...
Page 438: ...MOTOROLA SUMMARY OF CHANGES CPU12 S 2 REFERENCE MANUAL ...
Page 439: ......