We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I need to use generic pointers so I can access XDATA and CODE memory with my message handler. How do I know what the memory type is at runtime? Is there a function or macro for this? I know the memory type is in byte 0 of the pointer.... how do I go about accessing byte 0.
Hi Tim, This may be slightlly 'off topic' in that I use the C51 compiler, but isnt the whole idea of generic pointers thet you dont need to know whether it is XDATA or CODE, the compiled code uses respectivly 'movx' or 'movc' instructions based on the 1st byte of the pointer - which as you have seen determines the address space to be accessed. Hope this helps, Mark.