On Tue, Mar 03, 1998 at 07:04:35PM -0400, Bob Smith x31105 wrote: > for this beasty leaves me with the belief that I can't use ROM address > space for data?!?! somebody tell me I'm blind and haven't read the > correct page! You're very nearly right; data tables on a mid-range PIC are implemented as RETLW tables, indexed by an addwf PCL. For example: table addwf pcl retlw 1 retlw 2 You access the data with a call, with the 8 bit index of the data you want in W. You also have to worry about ROM pages if you have more than 2K of ROM. This technique stores 8 bits of data per 14 bit instruction. the same applies on the baseline PICs (12 bits instead of 14) but the high-end have instructions to read (and write!) the external program memory space. -- Clyde Smith-Stubbs | HI-TECH Software Email: clyde@htsoft.com | Phone Fax WWW: http://www.htsoft.com/ | USA: (408) 490 2885 (408) 490 2885 PGP: finger clyde@htsoft.com | AUS: +61 7 3354 2411 +61 7 3354 2422 --------------------------------------------------------------------------- ANSI C for the PIC! Now shipping! See www.htsoft.com for more info.