Branch Operations
Branch Operations
5.The logic operations cannot be performed directly with the contents of two registers.
6.The individual bits in the accumulator can be set or reset using logic instructions.
See Questions and Programming Assignments 20-29 at the end of this chapter.
The branch instructions are the most powerful instructions because they allow the mi-
croprocessor to change the sequence of a program, either unconditionally or under certain
test conditions. These instructions are the key to the flexibility and versatility of a com-
puter.
The microprocessor is a sequential machine; it executes machine codes from one
memory location to the next. Branch instructions instruct the microprocessor to go to a
different memory location, and the microprocessor continues executing machine codes
from that new location. The address of the new memory location is either specified ex-
plicitly or supplied by the microprocessor or by extra hardware. The branch instructions
are classified in three categories:
1.Jump instructions
2.Call and Return instructions
3.Restart instructions
This section is concerned with applications of Jump instructions. The Call and
Return instructions are associated with the subroutine technique and will be discussed in
Chapter 9; Restart instructions are associated with the interrupt technique and will be dis-
cussed in Chapter 12.
The Jump instructions specify the memory location explicitly. They are 3-byte in-
structions: one byte for the operation code, followed by a 16-bit memory address. Jump
instructions are classified into two categories: Unconditional Jump and Conditional Jump.
INSTRUCTION