July 2025
Beginner
528 pages
13h 18m
English
Until now, in our programming examples, each instruction was executed just once when we ran the program. But real programs do not always run in a straight line from start to finish! Many times, a program runs in a loop, repeating some operations over and over on different data elements. At times, it executes one part of the code and skips other based on specific conditions. Also, many programs use function calls, where the program needs to jump from one function to another and return at the end. The set of instructions that allow us to jump back and forth are called program-control instructions.
Cortex-M0 provides the following instructions for program control:
| Instruction | Example | Description |
|---|---|---|
B <label> |
B L1 |
Read now
Unlock full access