data segment
chgline db 0dh,0ah,24h
str1 db 500 dup(?)
str2 db 500 dup(?)
strY db 'Match',0dh,0ah,24h
strN db 'Not Match',0dh,0ah,24h
data ends
code segment
assume cs:code,ds:data,es:data
main proc far
mov ax,data
mov ds,ax
mov es,ax
lea si,str1
lea di,str2
xor cx,cx
L1: mov ah,01h
int 21h
cmp al,0dh
je L2
inc cx
mov [si],al
inc si
jmp L1
L2: lea dx,chgline
mov ah,09h
int 21h
mov bx,cx
xor cx,cx
L3: mov ah,01h
int 21h
cmp al,0dh
je L4
inc cx
mov [di],al
inc di
jmp L3
L4: lea dx,chgline
mov ah,09h
int 21
chgline db 0dh,0ah,24h
str1 db 500 dup(?)
str2 db 500 dup(?)
strY db 'Match',0dh,0ah,24h
strN db 'Not Match',0dh,0ah,24h
data ends
code segment
assume cs:code,ds:data,es:data
main proc far
mov ax,data
mov ds,ax
mov es,ax
lea si,str1
lea di,str2
xor cx,cx
L1: mov ah,01h
int 21h
cmp al,0dh
je L2
inc cx
mov [si],al
inc si
jmp L1
L2: lea dx,chgline
mov ah,09h
int 21h
mov bx,cx
xor cx,cx
L3: mov ah,01h
int 21h
cmp al,0dh
je L4
inc cx
mov [di],al
inc di
jmp L3
L4: lea dx,chgline
mov ah,09h
int 21