From: Maarten B. <sou...@ds...> - 2009-01-02 09:54:20
|
Happy New Year Mark, The difference is that medium model puts the variables in pdata and large in xdata. Pdata (max. 256 bytes) is smaller than xdata (max. 64kB) but can be accessed with two pointers (r0,r1) what might result in smaller code than xdata which only can use dptr. Maarten > 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 > > ------------------------------------------------------------------------------ > _______________________________________________ > Sdcc-user mailing list > Sdc...@li... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > |