go to home page   go to next page hear noise

created: 06/10/02; small corrections: 11/30/02, 07/05/03; audio: 02/14/04; revised 05/27/15, 04/10/16

CHAPTER 26 — Simple Subroutine Linkage

All high level languages have the concept of a subroutine (sometimes called procedure, function, or method). A subroutine is a logical division of the code that may be regarded as a self-contained operation. For example, the sine function is usually implemented as a subroutine. It can be regarded as an operation that can be used as needed in a program.

This chapter looks at a simple implementation in assembly language of this idea. The simple implementation is not adequate for the full power of subroutines (as implemented in high level languages), but is a good starting point. It corresponds to the type of subroutines implemented in the early days of programming.

Chapter Topics:

The two chapters after this one discuss subroutine call methods that are similar to those of modern languages.


(Review: ) What instructions unconditionally transfer control from one address to another?