I am just starting to learn asm. I want to write a small 'Hello World' DOS app. This is what my professor told me should do the job:
; hello.asm

.MODEL SMALL
.STACK 256

.DATA
ausgabe DB 'Hallo, Welt',13,10,'$'

.CODE
_start:
mov ax,@data
mov ds,ax

mov dx,OFFSET ausgabe
mov ah,9
int 21h

mov ah,4ch
int 21h

END _start

I have Visual Studio .NET 2003 and it comes with the newest version of MASM now renamed to ML.exe (it's MASM v7.1).

I tried to assemble my little programm with:
ml hello.asm


but it gives me the error message:
G:\Dev\Asm>ml hello.asm

Microsoft (R) Macro Assembler Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

Assembling: hello.asm
hello.asm(9) : error A2006: undefined symbol : DGROUP


I also tried the following source which gives me errors too:
; hello.asm

.MODEL SMALL
.STACK 256
.DOSSEG ; Force DOS segment order
DGROUP GROUP _DATA, STACK ; Stack and data in DGROUP


.DATA
ausgabe DB 'Hallo, Welt',13,10,'$'

.CODE
_start:
mov ax,DGROUP
mov ds,ax

mov dx,OFFSET ausgabe
mov ah,9
int 21h

mov ah,4ch
int 21h

END _start



ml hello.asm

Microsoft (R) Macro Assembler Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

Assembling: hello.asm
hello.asm(4) : warning A4015: directive ignored with /coff switch
hello.asm(5) : error A2214: GROUP directive not allowed with /coff option
hello.asm(13) : error A2004: symbol type conflict


I also tried some options like /Zi, /Zm and a different linker but it helps nothing. Please help.

// Edit1: Fixed some wrong code
Posted on 2003-10-10 13:43:58 by Jonus
you cannot assemble to coff format when doing 16bit stuff, as coff is for 32bit code.
With the later versions of masm, I think /coff is implicit, so you'll probably have to put
/omf on the cmdline to assemble to the shitty old OMF format.

Furthermore, you will need a 16bit linker - try googling this board to find a download
URL, microsoft has it available somewhere on their ftp site.
Posted on 2003-10-10 14:06:37 by f0dder
Thanks for the help f0dder and sorry for posting in the wrong forum.

The linker can be found here.
Posted on 2003-10-10 15:45:25 by Jonus