Chapter 14 Assembly-Language Macros

Assembly-language Microsoft Windows applications are highly structured assembly-language programs that use high-level–language calling conventions as well as Windows functions, data types, and programming conventions. Although you create assembly-language Windows programs by using a macro assembler, the goal is to generate object files that are similar to the object files generated by a C compiler. This chapter gives some guidelines that can help you meet this goal when creating assembly-language Windows applications.

The Microsoft Windows 3.1 Software Development Kit (SDK) includes the CMACROS.INC file. This file contains high-level–language macros, called Cmacros, that define segments, programming models, function interfaces, and data types needed to create Windows applications. The Cmacros provide assembly-time options that define the memory model and the calling conventions that an application will use. The options must be selected in the assembly-language source file before the INCLUDE directive is used.

This chapter provides an overview of the Cmacros and supplies the information necessary to create an assembly-language Windows application.