How to create a .COM executable in MASM32?

Started by adilima, December 27, 2008, 10:36:14 AM

Previous topic - Next topic

adilima

Hi,
I was trying to assemble the following code (16 bite DOS program) using:
\masm32\bin\ml /AT /c test1.asm
the code was assembled successfully, but I don't know how to link the .OBJ... :(
The linker returns error when converting OMF into COFF or something else...

.model tiny
.386
option casemap:none

   .code
   org 100h

start:
   ; set cursor pos at (5, 5)
   mov ah, 2
   mov bh, 0
   mov dl, 5
   mov dh, 5
   int 10h
   
   ; output the strMsg
   mov ah, 9h
   mov dx, offset strMsg
   int 21h
   
   ; readChar()
   mov ah, 1
   int 21h
   
   mov ah, 4ch
   int 21h
   
   xor ax, ax
   ret
   
   .data
   strMsg db "This program has been assembled by MASM32's ML.EXE", 13, 10, "$"

end start

As I learned from ML.EXE, it has the /AT switch, which supposed to produce .com output.
Anyone help?

Vortex


adilima

Thanks 4 the link.
I just realized that MASM32 v10 already include the linker called link16.exe  :bg