For instance,this is a very simple asm file, but why i can compile it under MASM6.11, but it can not be compiled with MASM7.0

;this is a test program
data segment
source db 40 dup('a')
data ends
extra segment
dest db 40 dup (?)
extra ends

code segment
main proc far
assume cs:code,ds:data,es:extra

push ds
xor ax,ax
push ax

mov ax,data
mov ds,ax
mov ax,extra
mov es,ax

lea si,source
lea di,dest
mov cx,40
rep movsb
main endp
code ends
end start

the error msg when i compile it is:
Assembling: C:\masm32\cjj\3-4\book.asm
C:\masm32\cjj\3-4\book.asm(33) : error A2006: undefined symbol : start
C:\masm32\cjj\3-4\book.asm(20) : error A2004: symbol type conflict
C:\masm32\cjj\3-4\book.asm(22) : error A2004: symbol type conflict
C:\masm32\cjj\3-4\book.asm(33) : error A2148: invalid symbol type in expression : start
Volume in drive C has no label.
Volume Serial Number is D08A-B600

Directory of C:\masm32\cjj\3-4

04/06/2002 02:07p 582 book
04/06/2002 02:12p 573 book.asm
2 File(s) 1,155 bytes
0 Dir(s) 3,004,866,560 bytes free
Posted on 2002-04-06 06:15:49 by Arthur_Chen

MASM32 is a 32 bit assembler package, to build DOS code, you need the linker from masm 6.11 which is an OMF linker.

You will find that DOS 16 bit segmented executable code and 32 bit windows flat memory model code do not mix, they are different technology from different eras.

Posted on 2002-04-06 07:06:22 by hutch--
his problem lies with the assembler, not the linker...
well, ml 7.x has /coff as default, so you'll need /omf switch to make
it produce 16bit OMF object file. The next problem is that "start"
lies within a proc, and thus has local scope. Simply define start
as "start::" instead of "start:" to give it global scope, and assemble
with "ml /c /omf file.asm", and it should at least assemble correctly.
I'd terminate with "mov ax, 4c00h / int 21h" instead of the ret...

And yes, a 16bit linker will be needed as well, you can find it "somewhere
at microsofts ftp", and perhaps at .
Posted on 2002-04-06 07:19:46 by f0dder
Posted on 2002-04-06 20:34:50 by Arthur_Chen
Thanks a not he said !!!

Is it a mistake or the answers didn't help him ??

It's a funny mistake....
Posted on 2002-04-08 04:39:11 by Vom-bonjour:-()
Hello, Mr. 'Good Morning'!
U'V got it!
U R the first guy that found it!
Ha-ha .

Really thanks!
To Fodder, hutch and you!
Maybe we can play football one day!
Posted on 2002-04-08 07:46:43 by Arthur_Chen