I am using the atmega328. I want to create a simple test application using a bootloader. I want to: Blink an led at one speed in the bootloader section of flash, and then blink at another speed in application section of flash. these are my fuse bits:

From my knowledge, if I set the BOOTRST fuse I can set where the program boot(or rests from)
so, I have set the program to execute from the begging of the boot loader section, 0x3800 (for a page size of 2048). this is on page 282 of the datasheet ).

This is the current code:
#include <avr/io.h>
#include <avr/delay.h>
void boot_program_page ()
{
DDRC = 0xFF;
PORTC = 0xFF;
_delay_ms(1000);
PORTC= 0x00;
_delay_ms(1000);
}
void main(void)
{
boot_program_page ();
asm ( "jmp 0x0000" );// Jump to application code.
PORTC = 0xFF;
_delay_ms(10000);
PORTC= 0x00;
_delay_ms(10000);
}
This is my understanding:
Because I have set the BOOTRST fuse at the beginning of the boot loader section, this code is burnt into the bootloader. As soon as the program sees the jump to application code (asm command) it burns the rest of the following code in the application memory. this is not what happens though, the boot_program_page() is just run indefinitely.
How can I fix this?
Thanks!!