Problem with creating object file and linking

Started by mo_greene, May 27, 2008, 08:01:59 PM

Previous topic - Next topic

mo_greene

Helly,

I started doing some things with Assembler a few hours a go, so I am totally a beginner.

I've written a programm (taken from a book about Assembler):

DATEN SEGMENT

Meldung db "Assembler ist garnicht so schwer."
       db "$"

DATEN ENDS

CODE SEGMENT

ASSUME CS:CODE,DS:DATEN

Anfang: mov ax, DATEN
mov ds, ax

mov dx, offset Meldung

mov ah,9

int 21h

mov ah, 4Ch

int 21h

CODE ENDS

END Anfang


When I try to create an object file and link this, a problem appears:

QuoteAssembling: C:\Users\David\Desktop\asm1.asm
C:\Users\David\Desktop\asm1.asm(12) : error A2004: symbol type conflict
C:\Users\David\Desktop\asm1.asm(27) : warning A4023: with /coff switch, leading
underscore required for start address : Anfang
_
Assembly Error

What went wrong?

Thanks a lot guys!  :bg

MichaelW

#1
I had no problem assembling and linking the code as is, using the ML from the MASM32 package and a 16-bit linker.

Edit: Perhaps I should have added that I assembled and linked with a batch file like this:

ML /c mg.asm
pause
LINK16 mg.obj;
pause
eschew obfuscation

Vortex

Hi mo_greene,

Welcome to the forum.

You should not use Masm's /coff swicth to assemble 16-bit asm code.