Hi, I am going through "Programming from ground up". Now I have the following code, which should give 2 as minimum answer, but I am getting 0 as answer when I do echo $?.
.section .data
data_items:
.long 3,67,34,222,56,87,9,2,88,22,11,66,900,0
.section .text
.globl _start
_start:
movl $0,%edi
movl data_items(,%edi,4),%eax
movl %eax,%ebx
start_loop:
cmpl $0,%eax
je loop_exit
incl %edi
movl data_items(,%edi,4),%eax
cmpl %ebx,%eax
jg start_loop
movl %eax,%ebx
jmp start_loop
loop_exit:
movl $1,%eax
int $0x80