Difference between pdata and xdata, SDCC

Thread Starter

RaviKumar.N

Joined Nov 24, 2005
4
Hi All,
I want to know the difference between pdata and xdata with respect to SDCC compiler. Both the keywords places the variable in the external memory.

Can anybody tell the difference between these two.


Regards,
Ravikumar.N
 

n9352527

Joined Oct 14, 2005
1,198
Originally posted by RaviKumar.N@Feb 22 2006, 05:47 AM
Hi All,
I want to know the difference between pdata and xdata with respect to SDCC compiler. Both the keywords places the variable in the external memory.

Can anybody tell the difference between these two.
Regards,
Ravikumar.N
[post=14264]Quoted post[/post]​
pdata is paged external memory. High byte of address is paged from P2 or SFR in some cases.
 

sci-3d

Joined Aug 22, 2006
51
Variables declared with xdata will be placed in the external RAM or in-chip extended RAM. This is the default storage class for the Large Memory model. For example P89V51RD2, it have 1024 bytes of ram, 256 bytes are used for internal RAM and the remain 764 bytes are used as extened RAM which can be accesed by using xdata.
 
Top