The Ember CPU — Initial Design Part 6: Jumps and Conditional Branches
- Tom Gambill
- Feb 21
- 1 min read
Updated: Mar 7

Now that we have Load-Store and common ALU instructions, we can add branching and jump instructions to the Ember CPU design.
Branch Instructions
Branches are useful when you want a CPU to repeat some operations multiple times, skip over other operations, or temporarily go to a subroutine nearby in the same program or library. They can also be used to call code in a library provided by the system, or code linked together with the program at compile time.
The definitions of Jump and Branch are a bit loose, but for our case, the simplest definition is that a Branch instruction may or may not be taken, depending on various condition flags in the CC status register, where a Jump instruction will always be taken.
Kommentare