News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Assembling error with masm.

Started by lord_kalipsy, January 11, 2005, 11:23:47 PM

Previous topic - Next topic

lord_kalipsy

Hi,

I already have a small experiance of programming with masm32 for windows, but it's not the best solution to test wath I'm learning in the Art of Assembly. This is why I started DOS programming with MASM ( It's possible to do 16bits programming with MASM32 ? ) but I got problems when I'm assembling/linking.

This is my code :


.model small
.stack
.data
message   db "Hello world", "$"

.code

main   proc
   mov   ax,seg message
   mov   ds,ax

   mov   ah,09
   lea   dx,message
   int   21h

   mov   ax,4c00h
   int   21h
main   endp
end main


And I assemble/link like that :

ml hello.asm
link hello.obj

(everything is in the same folder )

I tried a lot of exemple ( I've found some in the RadASM exemples, even if I don't use RadASM for this code ).

The error the linker give is :

hello.obj : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

Thanks for your help.

Ps : sorry for my bad english, it's note my motherthong.

Psy³


jimh

You simply need a 16-bit linker to link your obj file into a 16-bit .exe.  The following topic on the old version of the MASM forum talks about this.  (the link in the thread Michael's post gives needed to be updated.)

http://www.old.masmforum.com/viewtopic.php?t=4838

lord_kalipsy