Time to move this issue to some C/C++ mail-list, perhaps ? >Any idea why my modification of the C++ code didn't work? Hopefully not. Just mayhaps to [EE]: IMHO, of course. This is (possibly :-) ) a general discussion about mapping using tables or otherwise to transform an N>8 bit address value sparsely populated data range into an 8 bit address space. As such it is microprocessor relevant even if not especially PIC. Any implementation difficulties, whether in assembler or eg C, but especially in a HLL art liable to reflect a misunderstanding of what is being done and so are liable to be instructive. (difficulties in assembler are more liable to be difficulties with the language ;-) ). Russell McMahon -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.