Normally the CPU runs instructions in address order, because fetch adds 1 to the program counter. A jump breaks that order: it loads the PC with a new address, so the next fetch comes from there.
Tiny8 has two:
- JMP a (opcode 5): always
PC ← a. An unconditional jump. - JZ a (opcode 6):
PC ← aonly if Z = 1. A conditional branch.
Jumps are how programs get structure:
- a backward jump repeats code, making a program loop;
- a forward jump skips code;
- a conditional jump chooses between two paths, like an if-statement.
In hardware, JMP's execute step is one transfer, E1 PC ← IR[3:0]: the PC's mux selects the IR's address field and LdPC = 1. So JMP takes 5 cycles. It doesn't touch the ACC or Z.