	.section .text
	.global	start
	.type	start,@function
start:
	ldi	r28, lo8(_bootstack)
	ldi	r29, hi8(_bootstack)
	out	0x3d, r28
	out	0x3e, r29
	rcall	main

	.globl	exit
	.type	exit, @function
exit:
	out	0x2f, r24
	ret

	.global	dispatch
#	.type	dispatch,@function
dispatch:
	mov	r30, r24
	mov	r31, r25
	ld	r24, Z
	ldd	r25, Z+1
	out	0x3d, r24
	out	0x3e, r25
	pop	r31
	pop	r31
	out	0x3f, r31
	pop	r0
	pop	r1
	pop	r2
	pop	r3
	pop	r4
	pop	r5
	pop	r6
	pop	r7
	pop	r8
	pop	r9
	pop	r10
	pop	r11
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	r16
	pop	r17
	pop	r18
	pop	r19
	pop	r20
	pop	r21
	pop	r22
	pop	r23
	pop	r24
	pop	r25
	pop	r26
	pop	r27
	pop	r28
	pop	r29
	pop	r30
	pop	r31
	reti
