Advertisement
r4lovets

Untitled

Apr 23rd, 2019
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.23 KB | None | 0 0
  1. org 100h
  2.  
  3. EntryPoint:
  4. mov DX, 320 * 129 + 220
  5. mov AH, 0Fh
  6. int 10h
  7.  
  8.  
  9. mov [bOldMode], AL
  10. mov [bOldPage], BH
  11.  
  12. ; Включение 13-го видеорежима [320x200, 256 цветов]
  13. mov AX, $0013
  14. int 10h
  15.  
  16. ;
  17. push $A000
  18. pop ES
  19.  
  20. StartDraw:
  21. ; Небо
  22. mov AL, 11
  23. xor DI, DI
  24. mov CX, 320 * 160
  25. rep stosb
  26.  
  27. ; Вода
  28. mov AL, 1
  29. mov DI, 320 * 160
  30. mov CX, 320 * 40
  31. rep stosb
  32.  
  33.  
  34. ; Лодка
  35. mov AL, 114
  36. mov DI, DX
  37. mov CX, 120
  38. mov BX, 0
  39.  
  40. .Boat:
  41. add DI, 201
  42. add DI, BX
  43. sub CX, 2
  44. push CX
  45. rep stosb
  46. pop CX
  47.  
  48. add BX, 2
  49.  
  50. cmp CX, 50
  51. ja .Boat
  52.  
  53.  
  54. ; Мачта
  55. mov AL, 17
  56. ; mov DI, 320 * 10 + 159
  57. mov DI, DX
  58. sub DI, 320 * 119 + 61
  59.  
  60. .Machta:
  61. push DI
  62. mov CX, 3
  63. rep stosb
  64. pop DI
  65.  
  66. add DI, 320
  67.  
  68. cmp DI, 320 * 130
  69. jb .Machta
  70.  
  71.  
  72. ; Начало флага на мачте
  73. mov AL, 40
  74.  
  75. mov CX, 25
  76. ; mov DI, 320 * 10 + 162
  77. mov DI, DX
  78. sub DI, 320 * 119 + 58
  79.  
  80. .FlagUp:
  81. push DI
  82. dec CX
  83. push CX
  84. rep stosb
  85. pop CX
  86. pop DI
  87.  
  88. add DI, 320
  89.  
  90. cmp DI, 320 * 18
  91. jb .FlagUp
  92.  
  93. .FlagDown:
  94. push DI
  95. inc CX
  96. push CX
  97. rep stosb
  98. pop CX
  99. pop DI
  100.  
  101. add DI, 320
  102.  
  103. cmp DI, 320 * 26
  104. jb .FlagDown
  105.  
  106.  
  107. ; Парус
  108. mov AL, 43
  109. mov CX, 1
  110. ; mov DI, 320 * 30 + 159
  111. mov DI, DX
  112. sub DI, 320 * 89 + 61
  113.  
  114. .ParusUp:
  115. push DI
  116. add CX, 2
  117. push CX
  118. rep stosb
  119. pop CX
  120. pop DI
  121.  
  122. add DI, 320
  123.  
  124. push DI
  125. push CX
  126. rep stosb
  127. pop CX
  128. pop DI
  129.  
  130. add DI, 320
  131. sub DI, 1
  132.  
  133. cmp DI, 320 * 125
  134. jb .ParusUp
  135.  
  136. ; Пристань
  137. mov Al, 19
  138. mov DI, 320 * 129 + 280
  139.  
  140. Pristan:
  141. mov CX, 40
  142. rep stosb
  143.  
  144. add DI, 280
  145.  
  146. cmp DI, 320 * 160
  147. jb Pristan
  148.  
  149. InputSymbol:
  150. mov AH, 08h
  151. int 21h
  152.  
  153. cmp DX, 320 * 129 + 120
  154. je RightSh
  155.  
  156. cmp AL, '0'
  157. je Finish
  158.  
  159. LeftSh:
  160. cmp AL, '1'
  161. jne Resume
  162. sub DX, 2
  163. jmp StartDraw
  164.  
  165. Resume:
  166. cmp DX, 320 * 129 + 280
  167. je InputSymbol
  168.  
  169. RightSh:
  170. cmp AL, '2'
  171. jne InputSymbol
  172. add DX, 2
  173. jmp StartDraw
  174.  
  175. Finish:
  176. ret
  177.  
  178. bOldMode db ?
  179. bOldPage db ?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement