This document explains how to configure Microsoft Visual Studio 6.0 for editing, debugging, and running assembly language programs.
Some important guidelines to follow before continuing with the instructions on this page:
- We will assume that you have installed the assembler in the C:\Masm615 directory.
- The 16-bit linker supplied with MASM does not permit filenames longer than eight characters, excluding the extension. The same goes for the directory name holding the program.
- Make sure your source filenames have .ASM extensions and they are no longer than eight characters (not counting the extension).
The following is a simplified listing, minus all the remark (REM) lines of make16.bat:
PATH C:\Masm615
SET INCLUDE=C:\Masm615\INCLUDE
SET LIB=C:\Masm615\LIB
ML /nologo -c -Fl -Zi %1.asm
if errorlevel 1 goto terminate
LINK /nologo /CODEVIEW %1,,NUL,Irvine16;
if errorlevel 1 goto terminate
DIR %1.*
:terminate
pause
|
Build 16-bit MASMRun the Visual C++ 6.0 integrated development environment. First, we will create the Tools command to assemble and link your MASM programs:
Select Customize from the Tools menu and click on the Tools tab.
Scroll to the bottom of the Menu Contents text area and double click inside the dotted rectangle. Type the following name and press Enter:
Build 16-bit MASM
Enter the following information in each edit box. The Arguments entry is case-sensitive, including the variables such as $(FileName) and $(FileDir). Note the spacing very carefully! Within the Arguments line, leave at least one space after /C, and a space before $(FileName):
 |
If you're using Windows 98 or Windows Millenium, click here. |
Debug 16-Bit MASM
Add the following new command to the tools menu:
Debug 16-bit MASM
Enter the following values:
Build 32-bit MASM
Add the following new command to the tools menu:
Build 32-bit MASM
The Arguments entry is case-sensitive, including the variables such as $(FileName) and $(FileDir). This following screen snapshot is only for Windows 2000 or Windows XP. Enter the following information in each edit box:
 |
If you're using Windows 98 or Windows Millenium, click here. |
Note the spacing very carefully! Within the Arguments line, leave at least one space after /C, and a space before $(FileName).
DEBUG 32-Bit MASM
Add the following new command to the tools menu:
Debug 32-bit MASM
Enter the following values:
Notice the browse (...) button to the right of the Command entry--use this button to navigate to the location of msdev.exe on your computer.
Run MASM
Add the following new command to the tools menu:
Run MASM
(If you are using Windows 95/98/ME, insert command.com for the Command entry rather than CMD.EXE.)
Close the Customize window.
Test your configuration
Now either create a new ASM program and save it with an ASM extension, or open an existing ASM file. If you need help on this step, click here.
Select Build 16-bit MASM from the Tools menu. You should see messages from the Microsoft Assembler appear in the output window. If you've made any errors, fix them and assemble the program again until it's right.
Once the program builds correctly, you can run the program. Select RUN MASM from the Tools menu.
Next, select Debug 16-bit MASM from the Tools menu. Microsoft CodeView will run, and after a few seconds, your source program will appear. (Refer to Appendix C of the Irvine book for help in using CodeView, and look at the CodeView Debugger Help page on this Web site.)
You have finished customizing the Visual C++ Editor.
Build 16-bit MASM (Windows 98 or Millenium)
Windows 98 and Windows Millenium use Command.com as their command-line processor. The following screen snapshot shows the command and parameters you should use:
 |
Note that an extra argument (/E) was used here to increase your MS-DOS environment size. This reduces the likelihood of an "Out of Environment Space" error message when you run the make16.bat file. |
Continue to the Debug16 Step
Build 32-bit MASM (Windows 98 or Millenium)
Windows 98 and Windows Millenium use Command.com as their command-line processor. The following screen snapshot shows the command and parameters you should use:
 |
Note that an extra argument (/E) was used here to increase your MS-DOS environment size. This reduces the likelihood of an "Out of Environment Space" error message when you run the make32.bat file. |
Continue to the Debug32 Step
|