Advertisement
sujonshekh

Assemble com capital letter from keyboard

Mar 10th, 2017
545
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. ; add your code here
  8.  
  9. .data
  10.  
  11. .code
  12. mov ah,1
  13. int 21h
  14. cmp al,"Z"
  15. jg lower
  16. jle upper
  17.  
  18. lower: mov bl,al
  19. mov dl,0ah
  20. mov ah,2
  21. int 21h
  22.  
  23.  
  24. mov dl,0dh
  25. mov ah,2
  26. int 21h  
  27.  
  28. mov dl,bl
  29. mov ah,2
  30. int 21h  
  31. jmp endif
  32.  
  33. upper:
  34. mov dl,0ah
  35. mov ah,2
  36. int 21h
  37.  
  38. mov dl,0dh
  39. mov ah,2
  40. int 21h  
  41.  
  42.  
  43. mov dl,"?"
  44. mov ah,2
  45. int 21h  
  46.  
  47.  
  48.  endif:
  49.  
  50.  
  51.  
  52. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement