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

array type changed from xdata to code for optimisation

Hello,
I have const array of size 72 elements.I declared this array as xdata

UINT8 CONST XDATA A[30]={...};
but during optimisation i changed XDATA to CODE and because of this change i could save around 70 bytes.

Please let me know how can this change will save these many bytes.

Thanks is advance.
Pooja

Parents
  • Please let me know how can this change will save these many bytes.

    The 8051 architecture uses different processor instructions to access code space and xdata space. These instructions differ in size and cycle count. Details can be found in the 8051 programmers guide.

Reply
  • Please let me know how can this change will save these many bytes.

    The 8051 architecture uses different processor instructions to access code space and xdata space. These instructions differ in size and cycle count. Details can be found in the 8051 programmers guide.

Children
No data