Advertisement
anticlown

Assembler.Lab.8

May 21st, 2023 (edited)
676
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         org 100h
  2. jmp     EntryPoint
  3. ;=================================================================
  4. ; Раздел переменных
  5. ;=================================================================
  6. Coordinates         dw      100*100 + 50
  7. Iteraions1          dw      100
  8. Iteraions2          dw      80
  9. Iteraions3          dw      60
  10. Iteraions4          dw      40
  11. Iteraions5          dw      20
  12. TriangleConst       dw      319
  13. AdditionConst       dw      2
  14. ;=================================================================
  15. EntryPoint:
  16.     mov ax,13h
  17.     int 10h
  18.     push 0A000h
  19.     pop es
  20.  
  21.     mov al,0Fh
  22.     mov di,[Coordinates]
  23.     mov si,1
  24.     mov cx,[Iteraions1]
  25.     call PaintingLoop
  26.  
  27.     mov al,0Eh
  28.     mov di,[Coordinates]
  29.     mov si,1
  30.     mov cx,[Iteraions2]
  31.     call PaintingLoop
  32.  
  33.     mov al,0Dh
  34.     mov di,[Coordinates]
  35.     mov si,1
  36.     mov cx,[Iteraions3]
  37.     call PaintingLoop
  38.  
  39.     mov al,0Ch
  40.     mov di,[Coordinates]
  41.     mov si,1
  42.     mov cx,[Iteraions4]
  43.     call PaintingLoop
  44.  
  45.     mov al,0Bh
  46.     mov di,[Coordinates]
  47.     mov si,1
  48.     mov cx,[Iteraions5]
  49.     call PaintingLoop
  50.  
  51.     mov ah,0
  52.     int 16h
  53.     mov ax,3
  54.     int 10h
  55.     ret
  56.  
  57. ;=================================================================
  58. ; Дурка имени Проце
  59. ;=================================================================
  60.  PaintingLoop:
  61.     push cx
  62.     mov cx,si
  63.     rep stosb
  64.     add di,[TriangleConst]
  65.     sub di,si
  66.     add si,[AdditionConst]
  67.     pop cx
  68.     loop PaintingLoop
  69. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement