View Single Post
Old 09 February 2002, 01:27   #37
The Ancient One
Join Date: Feb 2002
Location: Kansas City/USA
Age: 63
Posts: 685
For the benefit of those who may still be curious about this, I seem to recall a bit more detail about what the purpose of the "pure bit" was for executable files, and how that related to the use of the "resident" command.

The purpose of "resident" is, as mentioned earlier in this thread, to cause the target executable to be loaded into the Amiga's memory AND to cause any subsequent execution of that executable to load the program directly from memory, instead of looking for it in your path. This would have the effect of speeding up boot times for commands that may be called numerous times during bootup. It also was handy for folks who spent much time working in a shell window, especially for those without hard drives - something I remember rather painfully.

For all of this to work, the executable code has to abide by certain rules though. Specifically, the program must be 100% relocatable - capable of running from any location in memory (since one never knows where it will end up being placed). If the program was not 100% relocatable but was made resident and executed from memory, the most likely result would be that the Amiga would crash when it hit some portion of the code which did not conform. The function of the "pure bit" was to flag the executable file as being one that does conform to this standard.

The fact that the resident command checks the pure bit and complains if it isn't set is simply a precaution intended to keep people from inadvertently crashing their machines by making things resident that shouldn't be resident. While the resident command can make a command resident even without the pure bit being set, that won't guarantee that the command will work when it is made resident and then executed. That all depends on the command.

I don't know if this is of any real interest to anyone but when I read this thread, my lone remaining brain synapse fired, and that happens so infrequently now that I just HAD to document it.
Chuckles is offline  
Page generated in 0.04026 seconds with 10 queries