Z80 Assembly 53: Loading and Executing User Programs

The Role of the Loader In a simple Z80 operating system, the loader is the kernel routine responsible for two primary tasks: Allocate Memory: Determine a safe, unused area of RAM for the user program. Transfer Code: Read the program’s machine code from the storage device (or RAM buffer) into the allocated space. Execute: Start the user program. The Program Loading Routine (Simplified) This routine assumes the program’s starting address and size are known (e.g., read from a file header). ...

September 27, 2025