Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- display macro msg
- lea dx,msg
- mov ah,09h
- int 21h
- endm
- assume cs:code, ds:data,ss: stack
- stack segment
- dw 100 dup(0)
- top label word
- stack ends
- data segment
- str1 db 0ah,"enter string1:$"
- str2 db 0ah,"enter string2:$"
- str3 db 50 dup('$')
- str4 db 50 dup('$')
- str5 db 0ah,"Not equal$"
- str6 db 0ah," equal$"
- data ends
- code segment
- start: mov ax,data
- mov ds,ax
- mov es,ax
- display str1
- lea si,str3
- mov cl,0
- loop1: mov ah,01h
- int 21h
- cmp al,0dh
- je ext
- inc cl
- mov [si],al
- inc si
- jmp loop1
- ext: display str2
- lea si,str4
- mov bl,0
- loop2: mov ah,01h
- int 21h
- cmp al,0dh
- je ext1
- inc bl
- mov [si],al
- inc si
- jmp loop2
- ext1: mov ch,0
- mov bh,0
- cmp bx,cx
- jnz no
- lea si, str3
- lea di,str4
- CLD
- REPZ cmpsb
- jz disp1
- no: display str5
- jmp stp
- disp1: display str6
- stp: mov ah,01h
- int 21h
- mov ah,4ch
- int 21h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement