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

overlaid data permanent

I have an application where, if used as intended, module 'N' is accessed and module 'O' is never accessed, However, if used with 'old format directives' module 'O' is accessed and module 'N' is never accessed.l

With some fancy tapdancing I can get to where all variables used in 'N' can be defined in module 'N" and no calls will depend on variables not set in the call sequence.

In short
will the 'module global' variables in module 'O' overlay the 'module global' variables in module 'N' and vv.

The number of 'module global' variables is VERY high, so passing variables is out of the question.

With a conditional compile it would be easy, but that is to be avoided.



extremely simplifieds example module "O" OR module 'N'

U8 x

void doit1(void)
{
  setx();
  dothis();
}

void doit2(void)
{
  setx();
  dothat();
}

void setx(vois)
{
 x=47;
}

dothis and dothat are functionhs that require x set.

A "yes they are overlaid" would be wonderful, if NO then other means are solicited.

Erik

0