Advertisement
Mamun23

correct_incorrect

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