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

Locating Arrays of Pointers

I want to put an array of pointers into IDATA as my real target has no off chip RAM.
If I assign them in the following way they do not locate properly.

int idata *ptr[20];

Any suggestions???

Cheers

Mark

Parents
  • int idata *ptr[20];
    This says create a pointer to 20 int's in IDATA but put the pointer itself in the default model space, DATA for small and XDATA for large model.

    To put both the int's and the pointer in IDATA do:
    int idata * idata ptr[20];
    To put the int's into DATA and the pointer in CODE, for another example, try:
    int data * code ptr[20];

    - Mark

Reply
  • int idata *ptr[20];
    This says create a pointer to 20 int's in IDATA but put the pointer itself in the default model space, DATA for small and XDATA for large model.

    To put both the int's and the pointer in IDATA do:
    int idata * idata ptr[20];
    To put the int's into DATA and the pointer in CODE, for another example, try:
    int data * code ptr[20];

    - Mark

Children