Chapter 15
Macros
Macros and procedures are similar because they both call a sequence of instructions to be executed in the main program. Procedures save memory and programming time, but require linkage to invoke the procedure, which requires a CALL and a RET instruction.
A procedure is a set of instructions that perform a specific task. They are invoked from another procedure — the calling procedure (or program) — and provide results to the calling program at the end of execution. Procedures (also called subroutines) are utilized primarily for routines that are called frequently by other procedures. The procedure routine is written only once, but used repeatedly; thereby, saving storage space. Procedures permit a program to be coded in modules; ...
Get X86 Assembly Language and C Fundamentals 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.