On Tue, Feb 16, 2010 at 12:36 AM, Christopher Head wrote: > On a PIC18, code ROM is organized into words, each of which is two > bytes long. In an ordinary CODE section, the assembler ensures every > line starts at an even address; it does this by filling an extra zero > byte if the previous line ended off-by-one. Thus, your example of one > byte per line will result in each byte being followed by the > implicitly-inserted zero. To fix this, put the table inside a CODE_PACK > section. Ok, looks like the code_pack seems to have fixed me up. I had planned to try this when I started today, and it was nice to see some confirmation of my thoughts. I'm not 100% sure yet what my other problem was, but I did end up with an issue when I initially used code_pack. I started like this: LED_Table LED_Table code_pack db ... Worked great for a while, then I made some changes and it suddenly stopped. Took me a bit of time, but I finally realized the linker had moved the table but the label that the code was reading to get all the addressing was outside that block. Amazing what a difference one line makes! Thanks! Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist