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 stored in wrong code class.

Can anyone tell me why the following code for the C167 will place the pointer in either the NDATA0 class or the XDATA0 class depending on which line is uncommented?

typedef struct
{
short type;
} DIR_ENTRY;

typedef DIR_ENTRY xhuge * DIR_PTR;


//DIR_PTR test1; // Pointer placed in the XDATA0 class.
DIR_ENTRY xhuge * test1; // Pointer placed in the NDATA0 class.

I am using version 4.06 of the compiler.

Thanks.

Parents
  • Jon,
    While the C51 Manual may provide the info you stated, this was a C166 post. Is the current C166 manual on this site? The C166 manual I have is better than many I have had to work with, and yes, does provide many good examples as well. The example you showed is illuminating but it also is C51 specific.

    One of the biggest problems all users have is dealing with the individual quirks of each of the many tools that we work with on a daily basis. The best we can hope for is good timely support from the vendor and forums like this where others share their solutions to the problems we face.

    Thanks for the help.

    Barry

Reply
  • Jon,
    While the C51 Manual may provide the info you stated, this was a C166 post. Is the current C166 manual on this site? The C166 manual I have is better than many I have had to work with, and yes, does provide many good examples as well. The example you showed is illuminating but it also is C51 specific.

    One of the biggest problems all users have is dealing with the individual quirks of each of the many tools that we work with on a daily basis. The best we can hope for is good timely support from the vendor and forums like this where others share their solutions to the problems we face.

    Thanks for the help.

    Barry

Children