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


; make sure to assemble w/ -n flag, e.g. 
; iasavr -n crt... 
; 
; bootloader startup file, same as crtavr.s except that vectors are routed 
; to the bootloader section and use jmp for the vector 
; 
	.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 ivsel 
 
	USE_ELPM = 0; 
	.include "init.s" 
 
; call user main routine 
	rcall _main 
_exit:: 
	rjmp	_exit 
 
; interrupt vectors. The first entry is the reset vector 
; 
	.area vector(abs) 
	.org 0 
	jmp __start