Difference between pdata and xdata, SDCC

Discussion in 'Programmer's Corner' started by RaviKumar.N, Feb 21, 2006.

  1. RaviKumar.N

    Thread Starter New Member

    Nov 24, 2005
    4
    0
    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
     
  2. n9352527

    AAC Fanatic!

    Oct 14, 2005
    1,198
    4
    pdata is paged external memory. High byte of address is paged from P2 or SFR in some cases.
     
  3. sci-3d

    Well-Known Member

    Aug 22, 2006
    51
    0
    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.
     
Loading...