Conditional Jumps

Branching

Branch - This only changes the flow of execution when a condition is true

Branch = Jump

It is not efficient to code the destination and the condition in machine code

So the condition is coded separately to the jump

Accumulator

Status/Condition Bit stores the effect of a the outcome

This allows for flow control based on a conditions outcome

How to do A=B

Remember break it down into two instructions

  1. A-B
  1. Branch if 0

How to do A<B

  1. A-B
  1. XOR the most significant bit (Sign Bit) and the Overflow
  1. Branch if ...