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 am using small memory model and I need to write data to an absolute memory location (0xC002), so I'm using the MVAR macro: #define DISPLAY_DATA MVAR(unsigned char, 0xC002) void main(void) { DISPLAY_DATA = '*'; } And I'm getting: MOVB RL4, #0x2A EXTP #3, #1 MOVB DPP0:2, RL4 The thing is, one of the DPP registers already contains '3' since the near memory is located in 0xD000-0xE7FF, so the EXTP instruction is unnecessary. Doesn't the linker/locator perform this sort of optimization to eliminate inefficiencies like this one? Is there a way to make use of 'near' addressing mechanism for accessing absolute memory locations without having to know which DPP contains which value?