Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .model small
- .stack
- .data
- message db "Enter password please:$"
- passwd db 'fuckyou'
- count dw 7
- correct dB "Welcome to my program!"
- notcorrect dB "invalid password$"
- .code
- begin: mov ax,@data
- mov ds,ax
- mov cx, count
- mov bx, offset passwd
- mov dx, offset message
- mov ah, 09
- int 21h
- again: mov ah, 08
- int 21h
- cmp al,[bx]
- jne error
- inc bx
- loop again
- mov dx,offset correct
- mov ah,09
- int 21h
- jmp over
- error: mov dx, offset notcorrect
- mov ah,09h
- int 21h
- over: mov ah, 4ch
- int 21h
- end begin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement