Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sseq segment stack
- b db 256 dup(?)
- sseq ends
- dseq segment
- strn db 13,10,'less string: $'
- s1 db 255 dup(?)
- s2 db 255 dup(?)
- dseq ends
- cseq segment
- start: assume cs:cseq, ds:dseq, ss: sseq
- mov ax, dseq
- mov ds, ax
- mov ah,3fh
- mov bx, 1
- mov cx,255
- lea dx, s1
- int 21h
- push ax
- mov ah,3fh
- mov bx, 1
- mov cx,255
- lea dx, s2
- int 21h
- push ax
- mov dx, offset strn
- mov ah, 09h
- int 21h
- pop ax
- mov bx,ax
- pop ax
- cmp ax, bx
- jb l1less
- mov dx, offset s2
- mov cx, bx
- jmp endt
- l1less:
- mov dx, offset s1
- mov cx, ax
- endt:
- mov ah, 40h
- int 21h
- mov ax,4C00h
- int 21h
- cseq ends
- end start
Advertisement
Add Comment
Please, Sign In to add comment