I am really new to this and am taking assembly at school. I was wondering why I am having a problem getting my file to run with the IDE.

TITLE PGM4_2: PRINT STRING PROGRAM
.MODEL SMALL
.STACK 100H
.DATA
MSG DB 'HELLO!$'
.CODE
MAIN PROC

MOV AX, @DATA //here is where i get an error says that it does not know what @data is
MOV DS, AX

LEA DX, MSG
MOV AH, 9
INT 21H

MOV AH, 4CH
INT 21H

MAIN ENDP
END MAIN

This code is strait out of our book and its not homework or anything, i can get it to run with just ml.exe ml.err and link.exe and I can link and run it fine. But when I try this IDE or any other I get that same error. It doesn?t recognize @DATA as the name of the data segment...

Any help is greatly appreciated and thanks in advance.

Joshua Davis
Posted on 2004-01-12 21:42:32 by joshuapd53
The file is DOS code, you must find a 16bit linker for it. The MASM32 package and most of the new assemblers cannot link 16 bit DOS code so you are pretty much done for. Try posting in this forum :

16 bit DOS real mode programming
Posted on 2004-01-12 22:02:47 by donkey
K, thanks i was kinda thinking that.

Thanks much
Posted on 2004-01-12 22:04:26 by joshuapd53