初学汇编
datarea segmentx dw x1,x2,x3,x4,x5,x6,x7,x8,x9,x10
y dw y1,y2,y3,y4,y5,y6,y7,y8,y9,y10
z dw z1,z2,z3,z4,z5,z6,z7,z8,z9,z10
logic_rule dw 00dch
datarea ends
prognam segment
main proc far
assume cs:prognam,ds:datarea
start:
push ds
sub ax,ax
push ax
mov ax, datarea
mov ds,ax
mov bx,0
mov cx,10
mov dx,logic_rule
next: mov ax,x[bx]
shr dx,1
jc subtract
add ax,y[bx]
jmp short result
subtract: sub ax,y[bx]
result: mov z[bx],ax
add bx,2
loop next
ret
main endp
prognam ends
end start
编译的时候好像是这里
x dw x1,x2,x3,x4,x5,x6,x7,x8,x9,x10
y dw y1,y2,y3,y4,y5,y6,y7,y8,y9,y10
z dw z1,z2,z3,z4,z5,z6,z7,z8,z9,z10
出了问题,请问是哪里出了问题,要怎么改?