Advertisement
filashkov

Untitled

Feb 18th, 2020
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %include "io.inc"
  2.  
  3. section .data
  4.     t dd 0
  5.     vx dd 0
  6.     vy dd 0
  7.     ax2 dd 0
  8.     ay2 dd 0
  9.  
  10. section .text
  11. global CMAIN
  12. CMAIN:
  13.     GET_DEC 4, vx
  14.     GET_DEC 4, vy
  15.     GET_DEC 4, ax2
  16.     GET_DEC 4, ay2
  17.     GET_DEC 4, t
  18.     mov eax, [vx]
  19.     imul eax, dword [t]
  20.     mov ebx, [ax2]
  21.     imul ebx, [t]
  22.     imul ebx, [t]
  23.     add eax, ebx
  24.     PRINT_DEC 4, eax
  25.     ;NEWLINE
  26.     PRINT_CHAR ' '  
  27.     mov eax, [vy]
  28.     imul eax, [t]
  29.     mov ebx, [ay2]
  30.     imul ebx, [t]
  31.     imul ebx, [t]
  32.     add eax, ebx
  33.     PRINT_DEC 4, eax
  34.     NEWLINE  
  35.     ;mov eax, 10
  36.     ;mov edx, 0
  37.     ;mov ecx, 2
  38.     ;div ecx
  39.     ;PRINT_DEC 4, eax
  40.     xor eax, eax
  41.     ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement