.text
_entry:
	movl	$2,%eax		! fork
	int	$0x80

	cmpl	$0,%eax		! parent: bye
	jg	bye

	movl	$6,%eax		! child: close fd's
	movl	$0,%ebx
	int	$0x80
	movl	$6,%eax
	movl	$1,%ebx
	int	$0x80
	movl	$6,%eax
	movl	$2,%ebx
	int	$0x80

loop:
	movl	$48,%eax	! signal (SIGALARM, dummy)
	movl	$14,%ebx
	movl	$dummy,%ecx
	int	$0x80

	movl	$134,%eax	! bdflush (1, 0)
	movl	$1,%ebx
	movl	$0,%ecx
	int	$0x80

	movl	$27,%eax	! alarm (30)
	movl	$30,%ebx
	int	$0x80

	movl	$29,%eax	! pause ()
	int	$0x80

	jmp	loop

dummy:
	ret

bye:
	movl	$1,%eax
	movl	$0,%ebx
	int	$0x80
