I am writing code that requires a fair amount of pointer arithmetic and manipulation. The C51 compiler appears to generate lots of generic pointers (much too my dismay). Is there any way to use the built in dual DPTR's to reduce the massive overhead associated with generic pointers significantly? The C51 derivative I'm using (MCS12XX) does have dual data pointers as far as I can tell.
I've attempted judicious use of the
#pragma modp2
directive with no visible change in the code output from the compiler. Specifically I am generating graphic information that is sent to a memory mapped graphic LCD. It works just fine that's not the problem. The problem is code space and the overhead that the generic pointers have are going to make things difficult to complete as wished. So is there a way to get around this?
Stephen
The compiler only uses #pragma modp2 for a few string manipalation functions. to reduce the pointer size you can use memory-specific pointers instead.
char * ptr; //-generic char data *ptr //-memory-specific