This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Pointer MSpace Help

I am trying to figure out how the 80C652 processor determines the memory space on pointers. Is there a way to store the pointer in 3 bytes (far doesn't work).

When I pass a variable via "TEXT HERE" does TEXT HERE goto code space? Anyhelp is appreciated.

Thanks,
Adam

Parents Reply Children
  • "Also how this relates to the c51 compiler and C code."

    In fact, it all relates to the c51 compiler and has nothing specifically to do with the processor itself.

  •                                             // pointer in data in
    #define U8DI  unsigned char   idata * data  // data       idata
    #define U8DX  unsigned char   xdata * data  // data       xdata
    #define U8IX  unsigned char   xdata * idata // idata      xdata
    #define U8XX  unsigned char   xdata * xdata // xdata      xdata
    #define U8IC  unsigned char   code  * idata // idata      code
    #define U8DC  unsigned char   code  * data  // data       code
    #define U8XC  unsigned char   code  * xdata // xdata      code
    #define U8CC  unsigned char   code  * code  // code       code
    
    #define U16DX unsigned short  xdata * data  // data       xdata
    #define U16IX unsigned short  xdata * idata // idata      xdata
    #define U16CC unsigned short  code  * code  // code       code
    #define U16DC unsigned short  xdata * data  // data       xdata
    
    #define U32DX unsigned long   xdata * data  // data       xdata
    #define U32DC unsigned long   xdata * data  // data       xdata
    

  • Does that make you a "Chear Leader"...?

    ;-)

    So you never point to unsigned data, then?

  • Does that make you a "Chear Leader"...?
    I stupidly thought I could cheat and get that one by you :)

    So you never point to unsigned data, then?

    HUH?, I always do

    Erik