What kind of program? Do you want to load the program as a normal file, or are you writing a trackloading demo or game?
If you want to use normal files and load them with GEMDOS you would have to create two different programs - one for the loader/splashscreen and one for the main program. In the loader you run the animation from the VBL interrupt, and in the main loop you load the program using Pexec(). When the program is finished loading you stop the animation and clean up, then you start the loaded program (again, using Pexec. Study the Pexec documentation carefully).