Chapter 4 MS-DOS Programming Tools

Preparing a new program to run under MS-DOS is an iterative process with four basic steps:

Use of a text editor to create or modify an ASCII source-code file

Use of an assembler or high-level-language compiler (such as the Microsoft Macro Assembler or the Microsoft C Optimizing Compiler) to translate the source file into relocatable object code

Use of a linker to transform the relocatable object code into an executable MS-DOS load module

Use of a debugger to methodically test and debug the program

Additional utilities the MS-DOS software developer may find necessary or helpful include the following:

LIB, which creates and maintains object-module libraries

CREF, which generates a cross-reference listing

EXE2BIN, which converts .EXE files to .COM files

MAKE, which compares dates of files and carries out operations based on the result of the comparison

This chapter gives an operational overview of the Microsoft programming tools for MS-DOS, including the assembler, the C compiler, the linker, and the librarian. In general, the information provided here also applies to the IBM programming tools for MS-DOS, which are really the Microsoft products with minor variations and different version numbers. Even if your preferred programming language is not C or assembly language, you will need at least a passing familiarity with these tools because all of the examples in the IBM and Microsoft DOS reference manuals are written in one of these languages.

The survey in this chapter, together with the example programs and reference section elsewhere in the book, should provide the experienced programmer with sufficient information to immediately begin writing useful programs. Readers who do not have a background in C, assembly language, or the Intel 80x86 microprocessor architecture should refer to the tutorial and reference works listed at the end of this chapter.