Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. 51
  2.  
  3. .model tiny
  4. .code
  5. org 100h
  6. start:
  7. mov cx,0
  8. mov ah,1
  9. int 21h
  10.  
  11. cmp al,"a"
  12. je aa
  13.  
  14. cmp al,"b"
  15. je bb
  16.  
  17. cmp al,"c"
  18. je cc
  19.  
  20. aa:
  21. cmp cx,3
  22. je koniec
  23. call tekst
  24. inc cx
  25. jmp aa
  26.  
  27. bb:
  28. cmp cx,5
  29. je koniec
  30. call tekst
  31. inc cx
  32. jmp bb
  33.  
  34. cc:
  35. cmp cx,10
  36. je koniec
  37. call tekst
  38. inc cx
  39. jmp cc
  40.  
  41. tekst:
  42. mov ah,09
  43. mov dx, offset info
  44. int 21h
  45. ret
  46.  
  47. koniec:
  48. mov ax, 4c00h
  49. int 21h
  50.  
  51.  
  52. info db "KOLOKWIUM$"
  53. end start
  54.  
  55.  
  56. 52
  57.  
  58. .model tiny
  59. .code
  60. org 100h
  61. start:
  62. mov cx,0
  63.  
  64.  
  65. poczatek:
  66. cmp cx,10
  67. je koniec
  68. mov ah,1
  69. int 21h
  70. cmp al,"w"
  71. je tekst
  72. inc cx
  73. jmp poczatek
  74.  
  75.  
  76.  
  77.  
  78. tekst:
  79. mov ah,9
  80. mov dx,offset info
  81. int 21h
  82. koniec:
  83. mov ax,4c00h
  84. int 21h
  85.  
  86. info db "KONIEC PROGRAMU$"
  87. end start
  88.  
  89. 53
  90.  
  91. .model tiny
  92. .code
  93. org 100h
  94.  
  95. start:
  96. mov ah,1
  97. int 21h
  98. sub al,48
  99.  
  100. licz:
  101. cmp al,9
  102. jg koniec
  103. cmp al,1
  104. jl koniec
  105. call tekst
  106. dec al
  107. jmp licz
  108.  
  109.  
  110. tekst:
  111. mov ah,9
  112. mov dx,offset info
  113. int 21h
  114. ret
  115. koniec:
  116. mov ax,4c00h
  117. int 21h
  118.  
  119.  
  120. info db "Assembler $"
  121. end start
  122.  
  123. 54
  124. .model tiny
  125. .code
  126. org 100h
  127. start:
  128. mov dl,90
  129. mov cx, 26
  130. jmp porownaj
  131.  
  132.  
  133. porownaj:
  134. cmp cx,0
  135. je koniec
  136. call znak
  137. dec cx
  138. dec dl
  139. jmp porownaj
  140. ret
  141.  
  142.  
  143.  
  144. znak:
  145. mov ah,2
  146. int 21h
  147. ret
  148.  
  149.  
  150.  
  151. koniec:
  152. mov ax, 4c00h
  153. int 21h
  154.  
  155.  
  156. end start
  157.  
  158.  
  159. 55
  160.  
  161. .model tiny
  162. .code
  163. org 100h
  164.  
  165. start:
  166. mov cx,5
  167.  
  168. liczba:
  169. mov ah,1
  170. int 21h
  171. dec cx
  172.  
  173. dodawanie:
  174. sub al, 48
  175. add bl, al
  176. cmp cx, 0
  177. je koniec
  178. jmp liczba
  179.  
  180. koniec:
  181. mov ax,4c00h
  182. int 21h
  183.  
  184.  
  185. end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement