1 data segment
2 source_buffer db 40 ('a')
3 data ends
4 ;
5 extra segment
6 dest_buffer db 40 (?)
7 extra ends
8 ;
9 code segment
10 main proc far
11 assume cs:code,ds:data,es:extra
12 start:
13 push ds
14 sub ax,ax
15 push ax
16 mov ax,data
17 mov ds,ax
18 mov ax,extra
19 mov es,ax
20 lea si,source_buffer
21 lea di,dest_buffer
22 cld
23 mov cx,40
24 rep movsb
25 ret
26 main endp
27 code ends
28 end start
是从书上抄的,目的是把40个字母a的字符串从源缓冲区传送到目的缓冲区.但是编译是有错误,请高手帮忙看看,纠正一下错误.非常感谢!
错误提示:
E:\RadASM\Masm32\Bin\ML.EXE /c /coff /Cp /nologo /I"E:\RadASM\Masm32\Include" "C:\Documents and Settings\Administrator\My Documents\1\1.asm"
Assembling: C:\Documents and Settings\Administrator\My Documents\1\1.asm
C:\Documents and Settings\Administrator\My Documents\1\1.asm(28) : error A2006: undefined symbol : start
C:\Documents and Settings\Administrator\My Documents\1\1.asm(6) : error A2009: syntax error in expression
C:\Documents and Settings\Administrator\My Documents\1\1.asm(16) : error A2004: symbol type conflict
C:\Documents and Settings\Administrator\My Documents\1\1.asm(18) : error A2004: symbol type conflict
C:\Documents and Settings\Administrator\My Documents\1\1.asm(28) : error A2148: invalid symbol type in expression : start
构建时发生错误.
总共编译时间 94 毫秒
注:行号是我加上去的.
[此贴子已经被作者于2007-5-28 20:58:39编辑过]