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

What's wrong with my struct *

I'm using 80c390 in 24-bit mode (a TINI board). If I define the following:

struct rtc
{
unsigned char seconds;
unsigned char minutes;
unsigned char hours;
}

struct rtc *p_time;

I have a pointer (p_time), which is located somewhere in XDATA ( > 0x100080) and it points to address I:0x00 and there messes up with register bank0.

If I declare the pointer as

struct rtc * xdata p_time;

it points to X:0x000000.

What am I doing wrong?

Val