Hi Mark,

Maarten Brock schrieb:
> 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.

Additionally the generic pointer is squeezed(*) into two bytes for the medium 
model.
(instead of three bytes for both small and large model)

This limits the address range that can be accessed by generic pointers to:
code  memory: 0x0000 .. 0x7fff (32k)
xdata memory: 0x0000 .. 0x3fff (16k)

Greetings,
Frieder



(*) see   #elif defined DSDCC_MODEL_MEDIUM   in
http://sdcc.svn.sourceforge.net/viewvc/sdcc/trunk/sdcc/device/lib/_gptrget.c
if you need more detail

------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to