Online Compiler Nasm

extern io_get_dec extern io_print_dec section .text global main main: ; a call io_get_dec mov ebx, eax ; b call io_get_dec mov ecx, eax ; c call io_get_dec mov edx, eax ; d call io_get_dec mov esi, eax ; b - c sub ecx, edx ; d - 2011 sub esi, 2011 ; (d - 2011) * (b - c) mov eax, esi imul eax, ecx ; a + ... add eax, ebx ; вывод call io_print_dec xor eax, eax ret
1) This code reads four integers, performs calculations: (a + ((d - 2011) * (b - c))), and prints the result.

2) Hint: Remember that `imul` with one operand multiplies EAX by that operand and stores the result in EDX:EAX, but here it's used with 32-bit values so the result fits in EAX alone.
Hint: The registers EBX, ECX, EDX, and ESI are used to store the input values a, b, c, and d respectively - track which variable is in which register through the calculations.