CHAPTER 6

Procedures

The 80×86 architecture enables implementation of procedures that are similar to those in a high-level language. In fact, 80×86 procedures can be called from high-level language programs or can call high-level language procedures. There are three main concepts involved: (1) how to transfer control from a calling program to a procedure and back, (2) how to pass parameter values to a procedure and results back from the procedure, and (3) how to write procedure code that is independent of the calling program. In addition, sometimes a procedure must allocate local variable space. The hardware stack is used to accomplish each of these jobs. This chapter begins with a discussion of the 80×86 stack. Sections 6.1 to 6.3 cover operations ...

Get Introduction to 80x86 Assembly Language and Computer Architecture, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.