出现问题,求助!
功能:实现数组A输入15个不等数,B输入20个不等的数,求出A,B相同的数并输出调试时当输完数组AB后就 <<编译框>>消失了.
data segment
a db 30 dup(?),'$'
b db 40 dup(?),'$'
c db 30 dup(?),'$'
p db 'please input 15(00-99) in A:$'
q db 'please input 20(00-99) in B:$'
r db 'the same in the A and B is:$'
data ends
code segment
assume ds:data,cs:code
CRLF macro
mov ah,2
mov dl,0dh
int 21h
mov dl,0ah
int 21h
endm
start: mov ax,data
mov ds,ax
lea dx,p
mov ah,9
int 21h
CRLF
mov si,0
lea bx,a
mov cx,30
a1: mov ah,1
int 21h
mov [bx][si],al
inc si
mov ax,si
mov dl,2
div dl
cmp ah,0
jnz a2
mov dl,' '
mov ah,2
int 21h
a2: loop a1
CRLF
lea dx,q
mov ah,9
int 21h
CRLF
mov si,0
lea bx,b
mov cx,40
a3: mov ah,1
int 21h
mov [bx][si],al
inc si
mov ax,si
mov dl,2
div dl
cmp ah,0
jnz a4
mov dl,' '
mov ah,2
int 21h
a4: loop a3
CRLF
mov si,0
mov dh,0
lea bx,a
a6: mov dl,0
mov ah,[bx][si]
inc si
mov al,[bx][si]
lea di,b
a7: SCASW
jz a5
inc dl
cmp dl,20
inc si
jz a6
jmp a7
a5: add dh,2
mov c,ah
inc c
mov c,al
inc c
inc si
cmp si,30
jz a8
jmp a6
a8: mov cl,dh
mov ch,0
lea bx,c
mov si,0
a9: mov dl,[bx][si]
inc si
mov ax,si
mov dl,2
div dl
cmp ah,0
jnz a10
mov dl,' '
mov ah,2
int 21h
a10: loop a9
mov ah,4ch
int 21h
code ends
end start