C51 Not usig Dual datapointer

We assumed that this verry good compiler could recognice "for" statements moving bytes from one buffer to another. This seams not to be right. From the manual I can se that the dual dp only works with a limited number of lib functions (strcpy, memcpy...)
Do anyone have experience in using dual dp on dallas 320 and do we have to set up any directives for the compiler to use the dual dp all over the program.

Henning

Parents
  • I think you're right - the only time C51 uses the extra DPTR(s) is in that very limited set of library functions.

    You could write some test routines & use the Performance Analyser to determine whether using memcpy with dual DPTRs is actually better than a 'for' loop.

    The trouble with memcpy is that it uses Generic pointers, which might negate the benefits of the 2nd DPTR?

    You could always write your own multi-DPTR-enabled library routines?

Reply
  • I think you're right - the only time C51 uses the extra DPTR(s) is in that very limited set of library functions.

    You could write some test routines & use the Performance Analyser to determine whether using memcpy with dual DPTRs is actually better than a 'for' loop.

    The trouble with memcpy is that it uses Generic pointers, which might negate the benefits of the 2nd DPTR?

    You could always write your own multi-DPTR-enabled library routines?

Children
More questions in this forum