You are on page 1of 10

Microprocessors

Module 10
Data Processing
1. Orient the students on how data is actually
processed.
2. Orient the students on how branching is achieved on
the microprocessor level.
Branching
Branching
Branching is accomplished by replacing the current
contents of the PC by the branch address, that is, the
address of the instruction to which branching is
required.
This branch address is usually obtained by adding an
offset X, which is given in the branch instruction, to the
updated value of the PC.
PARTS OF AN INSTRUCTION

OP CODE OFFSET FIELD


Control Sequence for Unconditional Branching
1. PCout, MARin, Read, Select1, Add, Zin
2. Zout, PCin, Yin, WMFC
3. MDRout, IRin
4. Offset-field-of-IRout, SelectY, Add, Zin
5. Zout, PCin, End
For conditional branching, the only difference is the
need to check the status of the condition codes before
loading a new value into the PC.
Example:
Branching on Negative Instruction (Jump if the sign flag
= 1)
1. PCout, MARin, Read, Select1, Add, Zin
2. Zout, PCin, Yin, WMFC
3. MDRout, IRin
4. Offset-field-of-IRout, SelectY, Add, Zin, if SF = 0 then
End
5. Zout, PCin, End
S. Mathur(2016), Microprocessor and Microcontrollers,
PHI Learning and Private Limited
Taylor and Francis Group. Essentials of Computer
Architecture. CRC Press, Comer, D. (2017).
Jones and Bartlett Learning, Computer Organization And
Architecture (10th Ed.), Stallings, (2016)

You might also like