
这道汇编小程序哪里出错了,
assumecs:codeasegmentdb1,2,3,4,5,6,7,8aendsbsegmentdb1,2,3,4,5,6,7,8bendscsegmentdb0,...
assume cs:code
a segment
db 1,2,3,4,5,6,7,8
a ends
b segment
db 1,2,3,4,5,6,7,8
b ends
c segment
db 0,0,0,0,0,0,0,0
c ends
code segment
start: mov ax,a
mov ds,ax
mov ax,b
mov es,ax
mov bx,0
mov cx,8
s: mov al,[bx]
add es:[bx],al
inc bx
loop s
mov ax,c
mov ds,ax
mov bx,0
mov cx,8
s0: mov al,es:[bx]
mov [bx],al
inc bx
loop s0
mov ax,4c00h
int 21h
code ends
end start
c:\masm>ml 6.asm
Microsoft (R) Macro Assembler Version 6.15.8803
Patched for you by promethee [ECL] in the year 2001 - enjoy
Copyright (C) Microsoft Corp 1981-2000. All rights reserved.
Assembling: 6.asm
error A4910: cannot open file: c:\masm\ML.err
6.asm(15) : error A2008: : c
6.asm(17) : error A2034:
6.asm(19) : error A2008: : c
6.asm(43) : error A2008: : c
在dos上运行时这个结果,求解
这道题是王爽汇编语言实验5的第五道题 展开
a segment
db 1,2,3,4,5,6,7,8
a ends
b segment
db 1,2,3,4,5,6,7,8
b ends
c segment
db 0,0,0,0,0,0,0,0
c ends
code segment
start: mov ax,a
mov ds,ax
mov ax,b
mov es,ax
mov bx,0
mov cx,8
s: mov al,[bx]
add es:[bx],al
inc bx
loop s
mov ax,c
mov ds,ax
mov bx,0
mov cx,8
s0: mov al,es:[bx]
mov [bx],al
inc bx
loop s0
mov ax,4c00h
int 21h
code ends
end start
c:\masm>ml 6.asm
Microsoft (R) Macro Assembler Version 6.15.8803
Patched for you by promethee [ECL] in the year 2001 - enjoy
Copyright (C) Microsoft Corp 1981-2000. All rights reserved.
Assembling: 6.asm
error A4910: cannot open file: c:\masm\ML.err
6.asm(15) : error A2008: : c
6.asm(17) : error A2034:
6.asm(19) : error A2008: : c
6.asm(43) : error A2008: : c
在dos上运行时这个结果,求解
这道题是王爽汇编语言实验5的第五道题 展开
1个回答
展开全部
可能是编译软件的问题。你用的软件,是被人破解过的D版。
程序没错。
我编译、连接时,显示的信息如下:
C:\MASM>masm z4
Microsoft (R) Macro Assembler Version 5.10
Copyright (C) Microsoft Corp 1981, 1988. All rights reserved.
Object filename [z4.OBJ]:
Source listing [NUL.LST]:
Cross-reference [NUL.CRF]:
48998 + 411733 Bytes symbol space free
0 Warning Errors
0 Severe Errors
C:\MASM>link z4
Microsoft (R) Overlay Linker Version 3.64
Copyright (C) Microsoft Corp 1983-1988. All rights reserved.
Run File [Z4.EXE]:
List File [NUL.MAP]:
Libraries [.LIB]:
LINK : warning L4021: no stack segment
C:\MASM>z4
C:\MASM>
程序没错。
我编译、连接时,显示的信息如下:
C:\MASM>masm z4
Microsoft (R) Macro Assembler Version 5.10
Copyright (C) Microsoft Corp 1981, 1988. All rights reserved.
Object filename [z4.OBJ]:
Source listing [NUL.LST]:
Cross-reference [NUL.CRF]:
48998 + 411733 Bytes symbol space free
0 Warning Errors
0 Severe Errors
C:\MASM>link z4
Microsoft (R) Overlay Linker Version 3.64
Copyright (C) Microsoft Corp 1983-1988. All rights reserved.
Run File [Z4.EXE]:
List File [NUL.MAP]:
Libraries [.LIB]:
LINK : warning L4021: no stack segment
C:\MASM>z4
C:\MASM>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询