	.section	.text
	.global	execv
	.type	execv, @function
execv:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$16, %esp
	addl	$1, 8(%ebp)		# file = file + 1
	cmpl	$0, 12(%ebp)
	je	end			# argv == 0
	movl	12(%ebp), %eax
	movl	%eax, -4(%ebp)		# pointer = argv
	jmp	loop
increment_string:
	movl	-4(%ebp), %eax
	movl	(%eax), %eax		# %eax = pointer, dereferenced
	leal	1(%eax), %edx
	movl	-4(%ebp), %eax
	movl	%edx, (%eax)		# %eax = %eax + 1
	addl	$4, -4(%ebp)		# pointer = pointer + 4
loop:
	movl	-4(%ebp), %eax
	movl	(%eax), %eax		# %eax = pointer, dereferenced
	testl	%eax, %eax
	jne	increment_string	# %eax <> 0
end:
	movl	$11, %eax		# execve system call
	movl	8(%ebp), %ebx		# file
	movl	12(%ebp), %ecx		# argv
	movl	$0, %edx		# envp not observed
	int	$128
	movl	%ebp, %esp
	popl	%ebp
	ret
