/*
 * Assembly sample of execve(2) for Linux.
 * $ gcc execve.S -o execve -Wall
 */
	.section .text

	.globl	main
	.type	main, @function
main:
	push	$('/')|('s'<<8)|('h'<<16)|( 0 <<24) # "/sh\0"
	push	$('/')|('b'<<8)|('i'<<16)|('n'<<24) # "/bin"
	mov	%esp, %ebx # 1st argument
	mov	$0, %ecx   # 2nd argument
	mov	$0, %edx   # 3rd argument
	mov	$11, %eax  # system call number (execve())
	int	$0x80      # system call
	pop	%ecx
	pop	%ecx
	ret
