Upload
manikandan
View
227
Download
0
Embed Size (px)
DESCRIPTION
Jump and Branch Instruction
Citation preview
7/7/2015 Jump and Branch Instructions
http://www.electronics.dit.ie/staff/tscarff/6800/jump_branch/jump_branch.htm 1/1
Jump and Branch InstructionsThe programme control instructions allow the flow of the programme to change. A change inflow often occurs when decisions are made. Programme control flow is affected by two types ofinstructions, Unconditional and Conditional.
The Unconditional instructions in the 6800 microprocessor are Jump, Jump to Subroutine,Branch Always and Branch to Subroutine.
The Conditional instructions in the 6800 microprocessor are all the Branch instructions exceptthe Branch Always instruction. The conditional instructions decision is based on the condition ofthe flag bit(s) in the Condition Code Register (CCR). If a branch test is 'true' then the branch willoccur, otherwise the next instruction is implemented.
The Branch instructions have an Offset associated which is a Signed number which isadded/subtracted to the Program Counter (PC) to provide a branch range from 128 to +127steps, from the address of the NEXT instruction to be implemented.
Using the Relative address mode the branch instruction allows the programme code to be relocatable.
The Jump instruction is not relocatable but can be used to access any address within the 64k($0000 to $FFFF) memory range. It operates in the Indexed or Extended address modes.