hi guys, i've a question , in my code i'm adding the base 2 power 3, and the base 5 power 2, then i add them the results shuld be 8 * 25 = 200, but my program shows 30 some one can explain me why??
to see the results give echo $? in the terminal
thanks
Code:
#PRPOUSE 
#
#	power program for n > 0
# we don't need variables

.section .data

.section .text
.globl _start

_start:
	
	pushl $3          #push the second argoment on the stack
	pushl $2          #push the frist argoment on the stack
	call power        #call the function power
	addl $8, %esp     #move the stack pointer back
	pushl %eax        #we store value returned from function in %eax
	pushl $2          #push the second argoment
	pushl $5          #push the frist argoment
	call power
	popl %ebx         #save the frist power in %ebx
			  #the last is arleady in %eax
	
	addl %eax, %ebx   #add the two power
	
	movl $1, %eax     #syscall exit
	int $0x80

#PROPOUSE
#	this function is used to compute the value of a number 
#	raised to a power
#INPUT  frist argoment is the base
#	second argoment the power to raise it to
#OUTPUT
#	will give the resuslt as a return value
#NOTES 
#	the power must be greather the 1
#VARIABLES
#	%ebx stroes the base nuber
#	%ecx stores the power
#	-4(%ebp) stores the current result
#	%eax is used for temponary storage

.type power, @function

power:
	
	pushl %ebp	    #save old base pointer
	movl  %esp, %ebp    #make stack pointer the base pointer
	subl $4, %esp        #get room for our local storage
	movl 8(%ebp), %ebx  #put the frist argoment in %ebx
	movl 12(%ebp), %ecx #put the second argoment in %ebx
	movl %ebx, -4(%ebp)  #store the current result
	
	power_loop_start:
		cmpl $1, %ecx       #look if the power is 1
		je end_power        #if are equal jump at the end
		movl -4(%ebp), %eax #put the current result in %eax
		imull %ebx, %eax    #multiply the current result by the base nuber
		movl %eax, -4(%ebp) #move the current result in -4(%ebp)
		decl %ecx           #decrease by one %ecx
		jmp power_loop_start
	
	end_power:
		movl -4(%ebp), %eax #put the results in %eax
		movl %ebp, %esp     #restore the stack pointer
		popl %ebp           #restore the base pointer
		ret                 #return