The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: bom on April 17, 2007, 03:13:50 PM

Title: Newbie problem: couldn't get exe file
Post by: bom on April 17, 2007, 03:13:50 PM
The Code was
                                .MODEL SMALL
      .STACK 64
      .DATA
DATA1      DB   52H
DATA2      DB   29H
SUM      DB   ?
      .CODE
MAIN   PROC   FAR      ;this is the program entry point
      MOV   AX,@DATA   ;load the data segment address
      MOV   DS,AX      ;assign value to DS
      MOV   AL,DATA1   ;get the first operand
      MOV   BL,DATA2   ;get the second operand
      ADD   AL,BL      ;add the operands
      MOV   SUM,AL   ;store the result in location SUM
      MOV   AH,4CH   ;set up to
      INT   21H      ;return to DOS
MAIN   ENDP         
      END   MAIN      ;this is the program exit point


I install masm32 Version 9 and link16 from the site.(OS:windows XP)
I execute the following procdures
1.ml /c fig2-1.asm ->  Assembling: fig2-1.asm
2.lnk16 fig2-1.obj -> but I couldn't get fig2-1.exe


Could anyone help please?
Thank you.
Title: Re: Newbie problem: couldn't get exe file
Post by: MichaelW on April 17, 2007, 03:29:16 PM
The code assembles and links Ok for me. What is lnk16.exe, and are you seeing a error message?
Title: Re: Newbie problem: couldn't get exe file
Post by: bom on April 18, 2007, 03:50:06 AM
sorry~~

I means
link16 fig2-1.obj

There is no error message,  but I don't see a fig2-1.exe at current directory.
Title: Re: Newbie problem: couldn't get exe file
Post by: MichaelW on April 18, 2007, 04:17:35 AM
If link16 is not creating the EXE, then it should be returning an error message. Are you seeing an error message? Is the OBJ file being created?