	.section	.text
	.global	execv
	.type	execv, %function
execv:
	push	{r7}		@ Needed for system call
	sub	sp, sp, #4	@ Allocate space for pointer
	add	r0, r0, #1	@ file = file + 1
	cmp	r1, #0
	beq	end		@ argv == 0
	str	r1, [sp]	@ pointer = argv
	mov	r2, r1		@ The loop expects r2 to contain pointer
	b	loop
increment:
	ldr	r2, [sp]	@ r2 = pointer
	ldr	r2, [r2]	@ r2 = r2, dereferenced
	add	r3, r2, #1	@ r3 = r2 + 1
	ldr	r2, [sp]
	str	r3, [r2]	@ pointer = r3 (pointer, dereferenced + 1)
	add	r2, r2, #4	@ pointer = pointer + 1
	str	r2, [sp]
loop:
	ldr	r2, [r2]	@ r2 = r2, dereferenced
	cmp	r2, #0
	bne	increment	@ pointer, dereferenced <> 0
end:
	mov	r2, #0		@ No environment variables
	mov	r7, #11		@ execve system call
	svc	#0
	add	sp, sp, #4	@ Deallocate space
	pop	{r7}
	mov	pc, lr		@ Return
