When the BOOTRST Fuse is unprogrammed, the Boot section size set to 4K bytes and
the IVSEL bit in the GICR 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
$000
$001
$002
$003
$004
$005
;
RESET:
ldi
r16,high(RAMEND) ; Main program start
out
SPH,r16
; Set Stack Pointer to top of RAM
ldi
out
sei
<instr> xxx
r16,low(RAMEND)
SPL,r16
; Enable interrupts
.org $3802
$3802
jmp
jmp
..
EXT_INT0
EXT_INT1
; IRQ0 Handler
$3804
; IRQ1 Handler
...
....
;
$3828
jmp
SPM_RDY
; Store Program Memory Ready Handler
When the BOOTRST Fuse is programmed and the Boot section size set to 4K bytes, the
most typical and general program setup for the Reset and Interrupt Vector Addresses is:
Address Labels
.org $002
$002
Code
Comments
jmp
jmp
..
EXT_INT0
EXT_INT1
; IRQ0 Handler
$004
; IRQ1 Handler
...
$028
;
....
;
jmp
SPM_RDY
; Store Program Memory Ready Handler
.org $3800
$3800
$3801
$3802
$3803
$3804
$3805
RESET:
ldi
out
ldi
out
sei
r16,high(RAMEND) ; Main program start
SPH,r16
; Set Stack Pointer to top of RAM
r16,low(RAMEND)
SPL,r16
; Enable interrupts
<instr> xxx
When the BOOTRST Fuse is programmed, the Boot section size set to 4K bytes and the
IVSEL bit in the GICR 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 $3800
$3800
$3802
jmp
jmp
RESET
EXT_INT0
; Reset handler
; IRQ0 Handler
$3804
jmp
..
EXT_INT1
SPM_RDY
; IRQ1 Handler
...
....
;
$3828
;
jmp
; Store Program Memory Ready Handler
$382A
$382B
$382C
$382D
$382E
$382F
RESET:
ldi
out
ldi
out
sei
r16,high(RAMEND) ; Main program start
SPH,r16
; Set Stack Pointer to top of RAM
r16,low(RAMEND)
SPL,r16
; Enable interrupts
<instr> xxx
46
ATmega32(L)
2503J–AVR–10/06