Your original Question..... "there is some startup code that calls PilotMain"
and my answer was correct. so it *was* your question....
"The position of the entry point in the code 1 resource is probably also compiler-dependent"
No, it would not be, the *name* could be different, the position could not possibly be different. If it was you're effectively saying an M515 would start execution at a different place to an M505, which would cause a nightmare for the compiler.
I digress, I'm just in need of a smoke....
/goes for cigarette
Dr. Vesselin Bontchev wrote:
I believe it's called __startup__
How it is called depends on the compiler. But that wasn't my question. The position of the entry point in the code 1 resource is probably also compiler-dependent. My question was how does the *OS* find the first machine language instruction in the application, so that it can transfer control to it?
There must be some standard way for that. In MS-DOS and Windows, the EXE files have special headers, some fields of which specify the location of the entry point relative to the start of the loaded image. COM files under MS-DOS are always run from offset 0x0100 of the segment in which they are loaded. And so on.
So, how does PalmOS do it?
Regards,
Vesselin
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
