Skip to main content
GameDev.net gamedev.net
🔒 Locked

Please help me with asm (using ML.exe/MASM.exe v7.1)

Started by Janju Oct 9, 2003 at 12:21 PM 6 replies 7.4k views
Original Post
Janju
Janju
I am just starting out and i typed in a hello world programm and saved it as a hello.asm file:
.MODEL SMALL
.STACK 256

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

.CODE
_start:
	mov ax,@data
	mov ds,ax
	
	mov ax,OFFSET ausgabe
	mov ah,9
	int 21h
	
	mov ah,4ch
	int 21h
	
END _start    
I tried to assemble it 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     
What's wrong? I am using the ML that comes with VS.NET 2003. [edited by - Jonus on October 9, 2003 1:23:28 PM]
UberGeek
UberGeek
Um...don''t you use masm to assemble and ml to link?
Janju
Janju
I will check it out asap.

Thanks for the help, ...
Janju
Janju
I did all that you said, but it still gives me the same error message.
.MODEL SMALL
.STACK 256

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

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

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

mov ah,4ch
int 21h

END _start


The error points still at line 9 with the same error message.

DGROUP has something to do with the @data. This is from the msdn library:
quote:
@data
The name of the default data group. Evaluates to DGROUP for all models except FLAT. Evaluates to FLAT under the FLAT memory model (text macro).

Yes i am trying to write a dos app and i am quit sure the code is correct because it runs perfect with tasm (borland).

[edited by - Jonus on October 10, 2003 2:21:48 PM]
Janju
Janju
Hey u Anonymous Poster you're right there was a problem in the code. Thanks for your help.

I know now why this crap didn't work. This is the command to assemble the hello.asm:
ml /omf /Bllink16 /Zm hello.asm 
For the 16-Bit crap to work you have to disable the /coff that ML implicit uses.

Again thanks for your great help to get me started.

[edited by - Jonus on October 10, 2003 4:54:44 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.