Datasheet

2. When the IVSEL bit in GICR is set, Interrupt Vectors will be moved to the start of the boot Flash
section. The address of each Interrupt Vector will then be the address in this table added to the
start address of the boot Flash section.
The next table shows reset and Interrupt Vectors placement for the various combinations of BOOTRST
and IVSEL settings. If the program never enables an interrupt source, the Interrupt Vectors are not used,
and regular program code can be placed at these locations. This is also the case if the Reset Vector is in
the Application section while the Interrupt Vectors are in the boot section or vice versa.
Table 16-2. Reset and Interrupt Vectors Placement
BOOTRST
(1)
IVSEL Reset Address Interrupt Vectors Start Address
1 0 0x000 0x001
1 1 0x000 Boot Reset Address + 0x001
0 0 Boot Reset Address 0x001
0 1 Boot Reset Address Boot Reset Address + 0x001
Note:  1. The Boot Reset Address is shown in table Boot Size Configuration in the Boot Loader
Parameters section. For the BOOTRST Fuse “1” means unprogrammed while “0” means programmed.
The most typical and general program setup for the Reset and Interrupt Vector Addresses in ATmega8A
is:
address Labels Code Comments
$000 rjmp RESET ; Reset Handler
$001 rjmp EXT_INT0 ; IRQ0 Handler
$002 rjmp EXT_INT1 ; IRQ1 Handler
$003 rjmp TIM2_COMP ; Timer2 Compare
Handler
$004 rjmp TIM2_OVF ; Timer2 Overflow
Handler
$005 rjmp TIM1_CAPT ; Timer1 Capture
Handler
$006 rjmp TIM1_COMPA ; Timer1 CompareA
Handler
$007 rjmp TIM1_COMPB ; Timer1 CompareB
Handler
$008 rjmp TIM1_OVF ; Timer1 Overflow
Handler
$009 rjmp TIM0_OVF ; Timer0 Overflow
Handler
$00a rjmp SPI_STC ; SPI Transfer
Complete Handler
AVR 8-Bit Microcontroller
Interrupts
© 2017 Microchip Technology Inc.
Datasheet Complete
40001974A-page 69