编写code段中的代码,将a段和b段中的数据依次相加,将结果存到c段中 5
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,c
MOV DS,AX
MOV BX,0
MOV CX,8
S: ADD DS:[BX],a:[BX]
ADD DS:[BX],b:[BX]
ADD BX,2
LOOP S
MOV AX,4C00H
INT 21H
code ends
end start
为什么调试过程中显示错误CANNOT ADDRESS WITH SEGMENT REGISTER 展开
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,c
MOV DS,AX
MOV BX,0
MOV CX,8
S: ADD DS:[BX],a:[BX]
ADD DS:[BX],b:[BX]
ADD BX,2
LOOP S
MOV AX,4C00H
INT 21H
code ends
end start
为什么调试过程中显示错误CANNOT ADDRESS WITH SEGMENT REGISTER 展开
展开全部
assume cs:code
a segment
db 1,2,3,4,5,6,7,8
a ends
b segment
db 11,22,33,44,55,66,77,88
b ends
d segment
db 0,0,0,0,0,0,0,0
d ends
code segment
start:
mov bx,0
mov cx,8
s:
mov ax,a
mov ds,ax
mov dl,[bx]
mov ax,b
mov ds,ax
add dl,[bx]
mov ax,d
mov ds,ax
mov [bx],dl
inc bx
loop s
mov ax,4c00h
int 21h
code ends
end start
a segment
db 1,2,3,4,5,6,7,8
a ends
b segment
db 11,22,33,44,55,66,77,88
b ends
d segment
db 0,0,0,0,0,0,0,0
d ends
code segment
start:
mov bx,0
mov cx,8
s:
mov ax,a
mov ds,ax
mov dl,[bx]
mov ax,b
mov ds,ax
add dl,[bx]
mov ax,d
mov ds,ax
mov [bx],dl
inc bx
loop s
mov ax,4c00h
int 21h
code ends
end start
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你写的也没什么地方改的,第5题吧?我以前这么做的!太久了,
start: mov ax,a
mov ds,ax
mov bx,0
mov cx,8
s: mov al,ds:[bx]
add al,ds:[bx+8]
mov ds:[bx+16],al
add bx,1
loop s
mov ax,4c00h
int 21h
start: mov ax,a
mov ds,ax
mov bx,0
mov cx,8
s: mov al,ds:[bx]
add al,ds:[bx+8]
mov ds:[bx+16],al
add bx,1
loop s
mov ax,4c00h
int 21h
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
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
d segment
db 0,0,0,0,0,0,0,0
d ends
code segment
start: mov ax,a
mov ds,ax
mov ax,d
mov es,ax
mov cx,8
mov bx,0
s: mov ax,0
add al,ds:[bx]
add al,ds:[bx+16]
mov es:[bx],al
inc bx
loop s
mov ax,4c00h
int 21h
code ends
end start
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
d segment
db 0,0,0,0,0,0,0,0
d ends
code segment
start: mov ax,a
mov ds,ax
mov ax,d
mov es,ax
mov cx,8
mov bx,0
s: mov ax,0
add al,ds:[bx]
add al,ds:[bx+16]
mov es:[bx],al
inc bx
loop s
mov ax,4c00h
int 21h
code ends
end start
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
a:[bx],b:[bx],这种写法是错误的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询