How to compile our console assebmly file, using MASM32.

Install MASM32 from here:
Link : MASM32 download.

Create a new folder in the MASM32 folder on the c: drive.
Save our "filename.asm" Assembly file here.

The .asm files can be edited in Wordpad, or we can use Notepad++.
Link : Notepad++ download.

To compile our assembly file, create a filename.bat file, which should have the following content:

FilenameCompile.bat :

Rem filename.asm make batch
c:\masm32\bin\ml.exe /c /Zd /coff c:\masm32\MyDirectory\filename.asm
c:\masm32\bin\link /SUBSYSTEM:CONSOLE  c:\masm32\MyDirectory\filename.obj
pause

Open the file manager. Let's find our own folder in the MASM32 folder and the filename.bat file inside it, and click on it twice to perform the compiletion.

If we didn't make a mistake in filename.asm, we got it in our MyDirectory folder a filename.obj and a filename.exe file.

We can run the filename.exe program by double-clicking on the program, but if the program window closes too soon, you should do the following:

Let's create a FilenameRun.bat file and write the following in it:

FilenameRun.bat:

REM FilenameRun.bat

c:\masm32\MyDirectory\Filename.exe

Pause

Let's run our FilenameRun.bat file by double-clicking on it.

If we did everything right, the result of the run will appear in the DOS window, and pressing the Space key will make the DOS window close.