Masm 2
Masm 2
Windows XP
This document describes in detail how you can assemble and run the assembly language
programs given in the text under Windows XP using the MASM assembler. (These
programs should also work with the TASM assembler.)
NOTE: Do NOT use the linker link.exe (32 bit) in the masm32/bin directory. For the
right linker, see Step 2.
Click start and select Control Panel. In the Control Panel, select System. It pops the
System Properties window. Press the Advanced tab to get access to Environment
Variables (see below).
Click Environment Variables button to open system and user environment variables (see
below).
Doubleclick Path (shown highlighted in the above screenshot) or select Path and click the
Edit button to edit the system variables (see below).
Place cursor in the Variable value field and press Home key on your keyboard. This takes
you to the beginning of the path variable list as shown below.
Enter the path of the directory that contains the nasm.exe file. For example, if it is in
C:\NASM_WINDOWS, add C:\NASM_WINDOWS; (don’t forget the semicolon) as
shown below:
http://download.microsoft.com/download/vc15/Update/1/WIN98/EN-US/Lnk563.exe
Execute this self-extracting file in the Command Prompt window. This gets the linker
link.exe we want. For convenience, keep this file in the same directory as ml.exe.
Now you are ready to execute assembly language programs under Windows XP using the
MASM assembler.
Do not use the Linux I/O files (io.mac and io.obj). Make sure to use the I/O files
that come with the MASM/Windows version. Now you are ready!
USING MASM
ml addigits.asm io.obj
ml /c addigits.asm
link addigits io
Good luck!