section .bss
a11 resd 1
a12 resd 1
a21 resd 1
a22 resd 1
b1 resd 1
b2 resd 1
res_x resd 1
res_y resd 1
x_fall resd 1
y_fall resd 1
section .data
fmt_in db "%u %u %u %u %u %u", 0
fmt_out db "%u %u", 10, 0
section .text
global main
extern scanf
extern printf
main:
push ebp
mov ebp, esp
push b2
push b1
push a22
push a21
push a12
push a11
push fmt_in
call scanf
add esp, 28
mov eax, [a11]
and eax, [a22]
mov ebx, [a12]
and ebx, [a21]
xor eax, ebx
push eax
mov eax, [b1]
and eax, [a22]
mov ebx, [b2]
and ebx, [a12]
xor eax, ebx
push eax
mov eax, [a11]
and eax, [b2]
mov ebx, [a21]
and ebx, [b1]
xor eax, ebx
push eax
mov eax, [a11]
or eax, [a21]
mov ebx, [a12]
or ebx, [a22]
mov ecx, [b1]
or ecx, [b2]
mov edx, eax
and edx, ecx
mov [x_fall], edx
not eax
and eax, ebx
and eax, ecx
mov [y_fall], eax
mov ebx, [esp+8]
mov eax, ebx
not eax
mov ecx, [esp+4]
and ecx, ebx
mov edx, [x_fall]
and edx, eax
or ecx, edx
mov [res_x], ecx
mov ecx, [esp+0]
and ecx, ebx
mov edx, [y_fall]
and edx, eax
or ecx, edx
mov [res_y], ecx
add esp, 12
push dword [res_y]
push dword [res_x]
push fmt_out
call printf
add esp, 12
mov esp, ebp
pop ebp
xor eax, eax
ret