Advertisement
Guest User

asdasdasdasdasdasd

a guest
Mar 27th, 2017
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. .model tiny
  2. .code
  3. org 100h
  4. start:
  5.  
  6. ;вычисление начальной позиции таблицы
  7. mov ah, 0fh
  8. int 10h
  9. xchg al, ah
  10. mov cl, ah
  11. xor ah, ah
  12. push ax
  13. mov dl, 4
  14. mul dl
  15. mov dx, ax
  16. pop ax
  17. push ax
  18. sub al, 36
  19. add dx, ax
  20. mov ax, 100h
  21. test cl, cl
  22. jne m1
  23. shr ax, 1
  24. m1:
  25. cmp cl, 1
  26. jne m2
  27. shr ax, 1
  28. m2:
  29. xchg bh, bl
  30. push dx
  31. mul bx
  32. pop dx
  33. cmp cl, 7
  34. jne m3
  35. sub ax, 800h
  36. m3:
  37. ;закраска всего экрана
  38. add ax, 0b800h
  39. mov es, ax
  40. mov al, 20h
  41. mov ah, 00101111b
  42. xor di, di
  43. mov cx, 2000
  44. rep stosw
  45.  
  46. ;первая строка таблицы
  47. mov di, dx
  48. mov al, 201
  49. stosw
  50. mov al, 205
  51. stosw
  52. mov al, 209
  53. stosw
  54. mov al, 205
  55. mov cx, 32
  56. rep stosw
  57. mov al, 187
  58. stosw
  59.  
  60. ;правая строка таблицы
  61. pop dx
  62. add dx, dx
  63. dec dx
  64. dec dx
  65. dec al
  66. add di, dx
  67. stosw
  68. add di, dx
  69. mov al, 182
  70. stosw
  71. sub di, 72
  72. mov al, 199
  73. stosw
  74. mov al, 196
  75. stosw
  76. inc al
  77. stosw
  78. dec al
  79. mov cx, 32
  80. rep stosw
  81. inc di
  82. inc di
  83. mov al, 186
  84. mov cl, 16
  85. PR:
  86. add di, dx
  87. stosw
  88. loop PR
  89. add di, dx
  90. mov al, 188
  91. stosw
  92. ;нижняя строка таблицы
  93. sub di, 72
  94. mov al, 200
  95. stosw
  96. mov al, 205
  97. stosw
  98. mov al, 207
  99. stosw
  100. mov al, 205
  101. mov cx, 32
  102. rep stosw
  103. sub di, 72
  104. mov cl, 16
  105. mov al, 186
  106. LR:
  107. sub di, dx
  108. stosw
  109. sub di, 4
  110. loop LR
  111. sub di, dx
  112. sub di, dx
  113. dec di
  114. dec di
  115. stosw
  116. inc di
  117. inc di
  118. mov al, 179
  119. stosw
  120. mov al, 20h
  121. mov cl, 16
  122. mov si, offset stroka
  123. cifr:
  124. lodsb
  125. stosw
  126. mov al, 20h
  127. stosw
  128. loop cifr
  129. sub di, 64
  130. mov al, 179
  131.  
  132. add di, dx
  133. mov cl, 16
  134. mov si, offset stroka
  135. ODN:
  136. add di, dx
  137. lodsb
  138. stosw
  139. mov al, 179
  140. stosw
  141. dec di
  142. dec di
  143. loop ODN
  144. stosw
  145. mov cx, 15
  146. sss:
  147. sub di, dx
  148. dec di
  149. dec di
  150. loop sss
  151.  
  152. mov si, 256
  153. xor al, al
  154. mov bl, 20h
  155. cycle:
  156. stosw
  157. inc al
  158. xchg al, bl
  159. stosw
  160. xchg al, bl
  161. test al, 0fh
  162. jnz endd
  163. add di, dx
  164. sub di, 62
  165. endd:
  166. dec si
  167. jnz cycle
  168. xor ah, ah
  169. int 16h
  170. mov al, 20h
  171. mov ah, 0000111b
  172. xor di, di
  173. mov cx, 2000
  174. rep stosw
  175. int 20h
  176. stroka db "0123456789ABCDEF$"
  177. end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement