www.pudn.com > iccavr_lib.rar > crtboothi.s, change:2003-11-08,size:614b


; make sure to assemble w/ -n flag, e.g. 
; iasavr -n crt... 
 
; bootloader startup file. Basically, the same as the crtboot.s except that 
; elpm is used and RAMPZ is set to 1. This is for device where the bootloader 
; resides at > 64K byte address 
 
	.include "area.s" 
 
	.text 
__start::			; entry point 
	; route vector 
	ldi R16,1 
	out 0x35,R16	; MCUCR = 1, unlock IVSEL 
	ldi R16,2 
	out 0x35,R16	; MCUCR = 2, set uvsel 
 
	USE_ELPM = 1 
	.include init.s 
; call user main routine 
	rcall _main 
_exit:: 
	rjmp	_exit 
 
	.area vector(abs) 
	.org 0		; will be relocated by -bvector switch 
	jmp __start