C51 v6.03+; uVision v2.07+ I want to build a Project with some files using the SMALL model, but most using LARGE. If I select LARGE in the Target options, and specify SMALL in the C51 'Misc Controls' where required, or use a #pragma in the file itself, I get a fatal Compiler error:
RESPECIFIED OR CONFLICTING CONTROL
L14: INCOMPATIBLE MEMORY MODEL
That's talking about the reentrant stack; not the 8032 CPU stack. The "reentrant stack" is a simulated stack created by Keil to support reentrant functions, due to the limitations of the 8032 CPU stack. The reentrant stack is used for parameters and locals; the 8032 CPU stack is still used for the return address (p97) Keil simulates the small reentrant stack in idata, the compact reentrant stack in pdata and the large reentrant stack in xdata - see p96. The large/compact reentrant stacks are less efficient because they're in xdata/pdata.
> Keil simulates the small reentrant stack in idata, > the compact reentrant stack in pdata and the > large reentrant stack in xdata - see p96. > The large/compact reentrant stacks are less efficient > because they're in xdata/pdata. You conclude that reentrant stack in idata more preferrable ? So, could you explain me which sense to simulate reentrant stack in idata ? Instead of simulated reentrant stack in idata can be used efficient native hardware stack (via SP and PUSH/POP instructions). Which sense in simulation ?