Рет қаралды 217,384
This lesson shows how to change the flow of control through your code.
The lesson starts by watching the execution of machine instructions
in the simplest linear program, where the control flows top to bottom.
Next, you will learn how to code a simple "while" loop in C. The
operation of the loop is explained with a flowchart.
Next, the program is executed in the simulator and you watch how
exactly the branch instructions modify the Program Counter (PC).
You will learn about the Application Program Status Register
(APSR) and how it controls the flow of conditional jumps.
You will also see the overhead added by a loop and you will learn
about the instruction pipeline and why the pipeline stalls when
a branch is taken.
In the last step of the lesson, you will learn how the "if" statement
works and how to use bitwise AND operator to test quickly whether
a number is odd or even.
In the next lesson will learn more about variables and pointers.
-----
Resources:
Companion web page for this video course:
www.state-mach...
GitHub repository for projects for this video course:
github.com/Qua...
KZbin PLAYLIST of the whole course:
• Modern Embedded System...
"ARMv7-M Architecture Reference Manual"
web.eecs.umich....