daily pastebin goal
75%
SHARE
TWEET

Untitled

a guest Sep 14th, 2017 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top