sak1b

assem_asg1

Nov 7th, 2017
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. task:
  2. mov ah,1 ;input mode on
  3. int 21h
  4. cmp al,'q'
  5. je exit
  6. cmp al,'Q'
  7. je exit
  8.  
  9. cmp al,'a'
  10. jge smallcheck ;small check
  11. smallback:
  12.  
  13. cmp al,'A'
  14. jge capcheck ; captial check
  15. capback:
  16.  
  17. jmp other ;kisu na mille other func
  18.  
  19. jmp task ; just in case
  20.  
  21.  
  22. smallcheck: ;small detection function
  23. cmp al,'z'
  24. jle small
  25. jmp smallback
  26.  
  27. small: ;small function
  28. mov ah,1 ;input on
  29. int 21h
  30. cmp al,'k'
  31. jl task ;k er kom hole main task e back
  32.  
  33. cmp al,'n' ;n er kom hole main task e back
  34. jl task
  35.  
  36. cmp al,'o'
  37. je ouprint
  38.  
  39. cmp al,'u'
  40. je ouprint
  41.  
  42.  
  43. jmp small
  44.  
  45. ouprint:
  46. mov ah,2 ;dis
  47. mov dl,al
  48. int 21h
  49. jmp small
  50.  
  51.  
  52. capcheck: ;captial detection function
  53.  
  54. cmp al,'Z'
  55. jle capital
  56. jmp task
  57.  
  58.  
  59. capital: ;captial function
  60. mov ah,2 ;display mode
  61. inc al
  62. mov dl,al
  63. int21h
  64.  
  65. inc al
  66. mov dl,al
  67. int21h
  68.  
  69. inc al
  70. mov dl,al
  71. int21h
  72.  
  73. inc al
  74. mov dl,al
  75. int21h
  76.  
  77. inc al
  78. mov dl,al
  79. int21h
  80.  
  81. jmp task
  82.  
  83.  
  84. other: ;other function definiton
  85. mov ah,2 ;display mode
  86. mov cx,8 ; init loop
  87. mov dl,'*'
  88. ko:
  89. int 21h
  90. loop ko
  91. jmp task
  92.  
  93. exit:
  94. ret
Advertisement
Add Comment
Please, Sign In to add comment