Advertisement
Guest User

Untitled

a guest
Aug 8th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. assume cs:code,ds:data
  2. data segment
  3. msg db 0dh,0ah,'enter the no.$'
  4. msg1 db 0dh,0ah,'entered  no. is even$'
  5. msg2db 0dh,0ah,'entered no is odd$'
  6. data ends
  7.  
  8. code segment
  9. start:
  10. mov ax,data
  11. mov ds,ax
  12.  
  13. mov ah,09h
  14. lea dx,msg
  15. int 21h
  16.  
  17. mov ah,01h
  18. int 21h
  19.  
  20. ror al,01h
  21. jnc here
  22.  
  23. mov dx,offset msg2
  24. mov ah,09h
  25. int 21h
  26. jmp there
  27.  
  28. here: mov dx,offset msg1
  29.          mov ah,09h
  30.          int 21h
  31.  
  32. there:mov ah,4ch
  33.          int 21h
  34. code ends
  35. end start
  36.  
  37. OUTPUT:
  38.  
  39. F:\TASM>td check
  40. Turbo Debugger  Version 3.00  Copyright (c) 1988,91 Borland International
  41. §enter the no.9
  42. entered no is odd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement