© Stephen Smith 2020
S. SmithProgramming with 64-Bit ARM Assembly Languagehttps://doi.org/10.1007/978-1-4842-5881-1_4

4. Controlling Program Flow

Stephen Smith1 
(1)
Gibsons, BC, Canada
 

Now we know a handful of Assembly Language instructions and can execute them linearly one after the other. We learned how to start and terminate a program. We built programs and debugged them.

In this chapter, we’ll make our programs more interesting by using conditional logic—if/then/else statements, from high-level languages. We will also introduce loops—for and while statements, from high-level languages. With these instructions in hand, we will have all the basics for coding program logic.

Note

We’ll start using small code snippets to demonstrate the concepts. These ...

Get Programming with 64-Bit ARM Assembly Language: Single Board Computer Development for Raspberry Pi and Mobile Devices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.