Steps for assembly files in Visual Studio 6.0 framework.

 

      1.   In order to assembly .asm files we need assembler software like ml.exe 

Get MASM6.15 at:

      http://www.piic.net/~win32asm/files/masm615.zip

 

  1. We also need include files for win32 programming. So Go and get it at:

http://www.piic.net/~win32asm/files/masm32v6.zip

Or Go visit home page

http://www.pbq.com.au/home/hutch/masm.htm

 

  1. In VC6 Create an empty Win32 Application project.

Add your .ASM file to the project. “Menu//Project//AddToProject//File…”

 

  1. In Project//Settings – select the .asm file and choose Custom Build :

 

Type in Command:

                              ml /Zi /c /nologo /coff $(InputPath)

 

Type in Outputs:

                              $(InputName).obj

 

5.       In Menu//Tools//Options//Directories put path to ml.exe in the list for executable paths.

 

      Compile it, Run It, Enjoy it.

 

P.S. Example for program:

;////////////////////////////////////////////////////////////////////////

;SAMPLE STARTS HERE

;////////////////////////////////////////////////////////////////////////

.386

.model flat,stdcall

option casemap:none

include D:\masm32\include\windows.inc

include D:\masm32\include\kernel32.inc

includelib D:\masm32\lib\kernel32.lib

include D:\masm32\include\user32.inc

includelib D:\masm32\lib\user32.lib

 

.data

MsgBoxCaption  db "MessageBox",0

MsgBoxText       db "It is working",0

 

.code

start:

invoke MessageBox, NULL, addr MsgBoxText, addr MsgBoxCaption, MB_OK

invoke ExitProcess, NULL

end start 

;///////////////////////////////////////////////////////////////////////////

;End Sample

;/////////////////////////////////////////////////////////////////////////

P.P.S

To make program very small set small section alignment:

In Menu//Settings//Link//

Type in Project Options switch:

            /ALIGN:4

Under this switch my program took 784 bytes under release mode. Not bad at all against usual 16Kb min size.