13 Control Flow Constructs

When writing a program in C or assembly language, we specify the order in which each statement or instruction is executed. This order is called the control flow. Programming by specifying the control flow is known as imperative programming. This is in contrast to declarative programming, where we state the logic of the computation and another program figures out the control flow to perform it.

If you have been using make to build your programs, as we recommended in Chapter 2, the statements in a makefile are an example of declarative programming. You specify the logic of the results, and the make program figures ...

Get Introduction to Computer Organization 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.