The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: dungdoan on January 21, 2009, 03:14:34 PM

Title: Help me correct this program (beginnig)?
Post by: dungdoan on January 21, 2009, 03:14:34 PM
I installed Quick Editor 3.0 including masm32 version 9.0.
I made a following program:

.486
.MODEL SMALL
.CODE
MAIN:

        mov AH, 2
        mov DL, '*'
        int 21h
       
END MAIN

Then I assemble this file. A error message is written on notepad screen:
Assembling: C:\masm32\display1.asm
C:\masm32\display1.asm(10) : warning A4023: with /coff switch, leading underscore required

Can you help correct this error? How to make it run without error?
Thank you,

Title: Re: Help me correct this program (beginnig)?
Post by: MichaelW on January 21, 2009, 04:22:43 PM
Hello dungdoan, welcome to the forum.

The error is because you are trying to build a 16-bit DOS application, and QE is set up to build 32-bit Windows applications. If you are free to choose between 16-bit DOS code and 32-bit Windows code, you should probably choose 32-bit Windows code. If not, then to build a 16-bit DOS application you will need to get a 16-bit linker, like the one available from the Forum Web Site, under Microsoft Tools. To avoid confusing the 16-bit linker with the 32-bit linker (both are named link.exe), I would rename the 16-bit linker to link16.exe. You can use any editor to create the source, and then in the simplest case assemble and link with a batch file like this:

ML /c filename.asm
pause
LINK16 filename.obj;
pause

Title: Re: Help me correct this program (beginnig)?
Post by: dungdoan on January 21, 2009, 05:20:35 PM
Thank you so much. :)