From: Mark S. <mark.swayne@q.com> - 2008-12-31 20:17:01
|
What is the difference between the medium and large memory models for the mcs51? The manual text is not clear on the exact differences: 3.17.1.1 ... When the medium or large model is used all variables declared without a storage class will be allocated into the external ram, this includes all parameters and local variables (for non-reentrant functions). When the small model is used variables without storage class are allocated in the internal ram. Judicious usage of the processor specific storage classes and the ’reentrant’ function type will yield much more efficient code, than using the large model. Several optimizations are disabled when the program is compiled using the large model, it is therefore recommended that the small model be used unless absolutely required. Thanks, --Mark Swayne |