Datasheet
Adddress Labels Code Comments
$001 RESET: ldi r16,high(RAMEND) ; Main program
start
$002 out SPH,r16 ; Set Stack
Pointer to top of
RAM
$003 ldi r16,low(RAMEND)
$004 out SPL,r16
$005 sei ; Enable
interrupts
$006 <instr> XXX
;
.org $c01
$c01 rjmp EXT_INT0 ; IRQ Handler
$c02 rjmp EXT_INT1 ; IRQ| Handler
:. :. :.
$c12 rjmp SPM_RDY ; Store Program
Memory Ready
Handler
When the BOOTRST Fuse is programmed and the boot section size set to 2K bytes, the most typical and
general program setup for the Reset and Interrupt Vector Addresses is:
Address Labels Code Comments
.org $001
$001 rjmp EXT_INT0 ; IRQ0 Handler
$002 EXT_INT1 ; IRQ1 Handler
:. :. :. ;
$012 rjmp SPM_RDY ; Store Program
Memory Handler
;
.org $c00
$c00 rjmp RESET ; Reset handler
;
$c01 RESET: ldi r16,high(RAMEND) ; Main program
start
$c02 out SPH,r16 ; Set Stack
Pointer to top of
RAM
AVR 8-Bit Microcontroller
Interrupts
© 2017 Microchip Technology Inc.
Datasheet Complete
40001974A-page 71