Datasheet

64
8011O–AVR–07/10
ATmega164P/324P/644P
0x00004 jmp EXT_INT1 ; IRQ1 Handler
... ... ... ;
0x00036 jmp SPM_RDY ; SPM Ready Handler
;
.org 0x1F000
0x1F000 RESET: ldi r16,high(RAMEND); Main program start
0x1F001 out SPH,r16 ; Set Stack Pointer to top of RAM
0x1F002 ldi r16,low(RAMEND)
0x1F003 out SPL,r16
0x1F004 sei ; Enable interrupts
0x1F005 <instr> xxx
When the BOOTRST Fuse is programmed, the Boot section size set to 8 Kbytes and the IVSEL
bit in the MCUCR Register is set before any interrupts are enabled, the most typical and general
program setup for the Reset and Interrupt Vector Addresses is:
Address Labels Code Comments
;
.org 0x1F000
0x1F000 jmp RESET ; Reset handler
0x1F002 jmp EXT_INT0 ; IRQ0 Handler
0x1F004 jmp EXT_INT1 ; IRQ1 Handler
... ... ... ;
0x1F036 jmp SPM_RDY ; SPM Ready Handler
;
0x1F03E RESET: ldi r16,high(RAMEND); Main program start
0x1F03F out SPH,r16 ; Set Stack Pointer to top of RAM
0x1F040 ldi r16,low(RAMEND)
0x1F041 out SPL,r16
0x1F042 sei ; Enable interrupts
0x1FO43 <instr> xxx
9.2.1 Moving Interrupts Between Application and Boot Space
The General Interrupt Control Register controls the placement of the Interrupt Vector table.