BRANCHING AND LOOPING

CHAPTER

5

5.1 Unconditional Jumps

5.2 Conditional Jumps, Compare Instructions, and if Structures

5.3 Implementing Loop Structures

5.4 for Loops in Assembly Language

5.5 Arrays

5.6 Chapter Summary

Computers derive much of their power from their ability to selectively execute code and from the speed at which they execute repetitive algorithms. Programs in high-level languages like Java or C++ use if–then, if–then–else, and case structures to selectively execute code, and loop structures such as while (pretest) loops, until (posttest) loops, and for (counter-controlled) loops to repetitively execute code. Some high-level languages have a goto statement for unconditional branching. Somewhat more primitive languages (like ...

Get Introduction to 80x86 Assembly Language and Computer Architecture, 3rd Edition 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.