When you compile an assembly language program for the C64, to run it you need to type the SYS command followed by the starting location of your program in memory.
To make it easier for the user to run your program without having to know the starting memory location, you can add a small basic program to the start of your program, so all the user has to type is the RUN command.
The assembly source can contain a little extra code that encodes the following BASIC line.
Each of the bytes in the loader program can be easily tailored to meet your requirements. So after inserting the disk which contains your program, the program can be loaded and run with the following commands:
The loader portion is just made up of a small number of bytes placed at the beginning of the assembly source code
In the simple example the real assembly code begins at address $1000. The test program simply changes the screen border colour to show that is actually running.
Complile, assemble and then load the output PRG on to a disk. Then you just LOAD and RUN it.