The short answer - no.
To be more complex - yes, you can do it:
The startup procedure branches to main() at the end .
Main sets up the stack and then proceeds to execute the code.
When main exits it branches to __stop_progExec__, passing LPM bits in r15.
In your case, if you want to run your own procedure instead of main,
you can branch to XM_main() when main exits. There is a compiler flag
-mendup-at=...
So, do the following:
----------------------------
int main(){
/* main sets up the stack */
return this_var_will_be_passed_to_XM_main;
}
XM_main(int param_from_main) {...}
---------------------------
and pass '-mendup-at=XM_main' to the compiler.
If you want to be even more complex - rewrite startup procedure :)
The way is explained in docs.
hope this helps.
~d
On Wednesday 26 February 2003 08:12, [email protected] wrote:
> Is there any way I can redefine the call to main() with another function
> without over riding the startup proceedure ? At the end of the
> application startup I would like to call my own function XM_main() instead
> of main(). Is this possible, am I making sense ?
>
> Cheers
>
> Matthew
> Design Engineer
> ----------------------------------------------------------------------
> Tekelek Pty Ltd
> Australia
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Scholarships for Techies!
> Can't afford IT training? All 2003 ictp students receive scholarships.
> Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
> www.ictp.com/training/sourceforge.asp
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
--
/********************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
(_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 3468202, 5585314
********************************************************************/