I have been trying to to read an integer from stdin and after write it in stdout, but the only thing that I accomplish is writing a simply hello world. This is the code that I have:
.global _start
_start:
push %ebp
movl %esp,%ebp
subl $4,%esp
#Read
mov $3,%eax #READ
mov $0,%ebx #STDIN
mov -4(%ebp),%ecx
mov $1,%edx
int $0x80
#Write call
mov $4,%eax #WRITE
mov $1,%ebx #STDOUT
mov -4(%ebp),%ecx
mov $1,%edx
int $0x80
mov $1,%eax #exit
mov $0,%ebx # exit code
int $0x80
Thanks in advance and don't be too hard on me because these are my first steps in assembly :)