
Blue Swirl wrote:
Are you sure it doesn't need to be initialized from anywhere else, like load_dictionary() or forth_init(), for the initialization to take effect before any of these?
Yes, since all uses of trampoline call setup_trampoline() before use. I also renamed 't' to trampoline2 to catch all uses of it.
I think I prefer Andreas' approach but with a slight modification - change the signature of init_trampoline() from: static void init_trampoline(void) to: static void init_trampoline(ucell *t) This enables the caller to pass in a pointer to the base of the trampoline ucell array, and so should work correctly when compiled as part of both bootstrap.c (host target) and the OpenBIOS output target. ATB, Mark. -- Mark Cave-Ayland - Senior Technical Architect PostgreSQL - PostGIS Sirius Corporation plc - control through freedom http://www.siriusit.co.uk t: +44 870 608 0063 Sirius Labs: http://www.siriusit.co.uk/labs