	.section	.text
	.global	signal
	.type	signal, %function
signal:
	push	{r7, lr}
	sub	sp, sp, #88
	str	r0, [sp, #4]	@ Save signal number
	str	r1, [sp]	@ Save handler
	str	r1, [sp, #12]	@ act.sa_handler = handler
	mov	r0, #0
	str	r0, [sp, #16]	@ act.sa_mask_val[0] = zero
	mov	r0, #0
	str	r0, [sp, #20]	@ act.sa_mask_val[1] = zero
	mov	r0, #0
	str	r0, [sp, #24]	@ act.sa_mask_val[2] = zero
	mov	r0, #0
	str	r0, [sp, #80]	@ act.sa_flags = zero
	mov	r2, #0		@ NULL
	add	r1, sp, #12	@ Address of act (where handler was saved)
	ldr	r0, [sp, #4]	@ Signal number
	mov	r7, #67		@ rt_sigaction system call
	svc	#0
	add	sp, sp, #88
	pop	{r7, pc}
