Scatterload a loadable file into memory
Source position: amigados.pas line 1703
function LoadSeg( |
name: PChar |
):LongInt; |
name |
|
Name of the file to load |
Pointer to the seglist
The file name should be a load module produced by the linker. LoadSeg() scatterloads the CODE, DATA and BSS segments into memory, chaining together the segments with BPTR's on their first words. The end of the chain is indicated by a zero. There can be any number of segments in a file. All necessary relocation is handled by LoadSeg().
In the event of an error any blocks loaded will be unloaded and a NULL result returned.
If the module is correctly loaded then the output will be a pointer at the beginning of the list of blocks. Loaded code is unloaded via a call to UnLoadSeg().
|
Unload a seglist previously loaded by LoadSeg() |
|
|
Low-level load routine |
|
|
Create a new process |
|
|
Create a new process from taglist |
|
|
Improved version of LoadSeg for stacksizes |