I'm trying to write a loop that will ask for user input for four numbers. The program compiles normally, the numbers are entered, but in the debugger using gdb-peda it is shown that with each integration, the last number input by the user is entered in place of all the numbers.
section .data
msg_x db 'Enter coordinate:', 0xa
len_x equ $ - msg_x
section .bss
x resb 2
section .text
global _start
_start:
enter:
mov eax, 4
mov ebx, 1
mov ecx, msg_x
mov edx, len_x
int 80h
mov eax, 3
mov ebx, 0
mov ecx, x
mov edx, 2
int 80h
push x
inc edi
cmp edi, 4
jb enter