section .bss
vx resd 1;
vy resd 1;
a_x resd 1;
a_y resd 1;
t resd 1;
section .data
msg db ' ', 0
section .text
extern io_get_dec, io_print_dec, io_newline, io_print_string
global main
main:
mov ebp, esp; for correct debugging
call io_get_dec;
mov [vx], eax;
call io_get_dec;
mov [vy], eax;
call io_get_dec;
mov [a_x], eax;
call io_get_dec;
mov [a_y],eax;
call io_get_dec;
mov [t], eax;
imul eax,[vx];
mov [vx],eax;
mov eax,[t];
imul eax,[vy];
mov [vy], eax;
mov eax, [t];
imul eax,eax;
mov [t], eax;
imul eax, [a_x];
add eax, [vx];
call io_print_dec;
mov eax, msg;
call io_print_string;
mov eax, [t];
imul eax, [a_y];
add eax, [vy];
call io_print_dec;
xor eax, eax;
ret;