	.section	.text
	.global	signal
	.type	signal, @function
signal:
	pushl	%ebp
	movl	%esp, %ebp
	pushl	%ebx
	subl	$84, %esp		# Allocate space
	movl	12(%ebp), %edx		# Get signal handler
	movl	%edx, -84(%ebp)		# act.sa_handler = handler
	movl	$0, -80(%ebp)		# act.sa_mask.val[0] = zero
	movl	$0, -76(%ebp)		# act.sa_mask.val[1] = zero
	movl	$0, -72(%ebp)		# act.sa_mask_val[2] = zero
	movl	$0, -16(%ebp)		# act.sa_flags = zero
	movl	$0, %edx		# Third argument = NULL
	leal	-84(%ebp), %ecx		# Second argument = address of act (where handler was loaded)
	movl	8(%ebp), %ebx		# First argument = signal number
	#movl	$174, %eax		rt_sigaction system call
	movl	$67, %eax		# sigaction system call
	int	$128
	popl	%ebx
	movl	%ebp, %esp		# Deallocate space
	popl	%ebp
	ret
