Advertisement
sujonshekh

compare char from keyboard jeba'

Feb 24th, 2017
510
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; You may customize this and other start-up templates;
  2. ; The location of this template is c:\emu8086\inc\0_com_template.txt
  3.  
  4. org 100h
  5.  
  6. .data
  7. x_ db 0ah,0dh, "Coorect !   $"
  8.  
  9. z_ db 0ah,0dh, "incorrect mamM maa's  :( vulhoisey     $"
  10.  
  11.  
  12. .code
  13. mov ax,@data
  14. mov ds,ax
  15.  
  16.    
  17.     mov ah,1  
  18.     int 21h
  19.     mov bl,al
  20.    
  21.    
  22. cmp bl,'y'
  23. je odd_
  24.    
  25.  cmp bl,'Y'
  26. je odd_
  27.        
  28.     jne z5
  29.  
  30.    
  31.  
  32.     odd_:
  33.     lea dx,x_
  34.     mov ah,9
  35.     int 21h  
  36.      jmp finish
  37.    
  38.    
  39.      
  40.       z5:
  41.    lea dx,z_
  42.    mov ah,9
  43.    int 21h
  44.    jmp finish
  45.                  
  46.                  
  47.      
  48.    
  49.          
  50.          finish:
  51.  
  52. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement