马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
assume cs:c,ds:d
d segment
dw 0000H, 0011H, 0022H, 0033H, 0044H, 0055H, 0066H, 0077H, 0088H
dw 0099H, 7777H, 2022H, 2033H, 2044H, 2055H, 2066H, 2077H, 2088H, 2099H, 2000H
dw 0000H, 0011H, 0022H, 0033H, 0044H, 0055H, 0066H, 0077H, 0088H, 0099H
dw 1011H, 1022H, 1033H, 1044H, 1055H, 1066H, 1077H, 1088H, 1099H, 1000H
dw 2011H, 2022H, 2033H, 2044H, 2055H, 2066H, 2077H, 2088H, 2099H, 2000H
dw 32 DUP(0)
d ends
c segment
start:
mov ax,d
mov ds,ax
mov es,ax
mov si,0
mov di,40
mov bx,100
mov cx,50
l:
cmp cx,0
je e1
cmp word ptr [si],word ptr [di]
ja l1
mov ax,[si]
mov es:[bx],ax
add si,2
jmp l2
l1:
mov ax,[di]
mov es:[bx],ax
add di,2
l2:
add bx,2
dec cx
jmp l
e1:
cmp word ptr [si],0
je e2
mov ax,[si]
mov es:[bx],ax
add si,2
add bx,2
cmp word ptr [si],0
jne e1
e2:
cmp word ptr [di],0
je e3
mov ax,[di]
mov es:[bx],ax
add di,2
add bx,2
cmp word ptr [di],0
jne e2
e3:
mov ax,4c00h
int 21h
c ends
end start
|