O'Reilly logo

Embedded Systems and Computer Architecture by Graham R Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7

Program structures

In Chapter 6 we saw the variety of instructions that are available to a programmer of the G80. In this chapter we see how these instructions, and the data on which they operate, are best organized into various structures. Programs are written in order to process data; indeed, what is commonly referred to as a ‘program’ is an algorithm that processes data. Thus we have that ‘Program = Data + Algorithm for processing the Data’. We use program control structures to define the algorithm; we use data structures to store data in a way that helps us devise simple algorithms.

In this chapter, we look first at how instructions may be organized into the three basic program control structures sequence, while, and if/else, and then ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required