nsaboy.blogg.se

Program flow mechanism in computer architecture
Program flow mechanism in computer architecture








program flow mechanism in computer architecture program flow mechanism in computer architecture

The only available mechanisms to permit non-sequential execution on a CPU is the use of (conditional) "jump" or "branch" instructions that explicitly set the program counter to an arbitrary address. If/else, for, and while loops are called "block structured" control flow statements because they explicitly control whether (or how often) a "block" of code is executed. Control-flow statements provide the ability to execute statements in non-sequential order.

program flow mechanism in computer architecture

The translation of these sructures to assembly language can be non-trivial and error-prone.Ī technique to simplify this process through the reduction of block-structured primitives to (conditinal) GOTOs is also presented.Ĭontrol flow refers to the order that statements or instructions are executed.










Program flow mechanism in computer architecture