Advertisement
Guest User

Untitled

a guest
Sep 14th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. .model small
  2. .stack
  3. .data
  4.  
  5. message db "Enter password please:$"
  6. passwd db 'fuckyou'
  7. count dw 7
  8. correct dB "Welcome to my program!"
  9. notcorrect dB "invalid password$"
  10.  
  11. .code
  12. begin: mov ax,@data
  13. mov ds,ax
  14.  
  15. mov cx, count
  16. mov bx, offset passwd
  17.  
  18. mov dx, offset message
  19. mov ah, 09
  20. int 21h
  21.  
  22. again: mov ah, 08
  23. int 21h
  24.  
  25. cmp al,[bx]
  26. jne error
  27. inc bx
  28. loop again
  29.  
  30. mov dx,offset correct
  31. mov ah,09
  32. int 21h
  33. jmp over
  34.  
  35. error: mov dx, offset notcorrect
  36. mov ah,09h
  37. int 21h
  38.  
  39. over: mov ah, 4ch
  40. int 21h
  41. end begin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement