I've been thinking about the automatic-ness of compiler page switching since you mentioned it, Fred. I cannot imagine how the compiler accomplishes that. I mean, processor page switching and return is a dynamic process. And the need for page switching depends on which instruction (memory page) the processor is executing at the time the call is made.Fred wrote:Fortunately the compiler takes care of both moving to the page IF required and moving back to the caller page afterwards IF required.
The compiler can be set up to add additional duplicate instructions to the source code before every call. Instructions for the processor to determine what memory page it's on, and then switch pages if needed. But that process occurs inside the EMS processor while running the program and operating the motor.
Granted, I may not be understanding the relevant issues. Or maybe you were just talking about the compiler adding those duplicate instructions to the source code before every call instruction, before it compiles. Or maybe there's a method of writing code that is fully 'deterministic'. I've learned a few things about coding methodologies from you and from this forum.
- Jim