gnupic: Re: [gnupic] 18F, table read, sdcc


Previous by date: 6 Aug 2005 18:58:09 +0100 Re: [gnupic] Learning PIC on the job, George M. Gallant, Jr.
Next by date: 6 Aug 2005 18:58:09 +0100 Re: [gnupic] 18F, table read, sdcc, Peter Onion
Previous in thread: 6 Aug 2005 18:58:09 +0100 Re: [gnupic] 18F, table read, sdcc, Peter Onion
Next in thread: 6 Aug 2005 18:58:09 +0100 Re: [gnupic] 18F, table read, sdcc, Peter Onion

Subject: Re: [gnupic] 18F, table read, sdcc
From: Alessandro Zummo ####@####.####
Date: 6 Aug 2005 18:58:09 +0100
Message-Id: <20050806195704.13ad9070@inspiron>

On Sat, 06 Aug 2005 00:15:57 +0100
Peter Onion ####@####.#### wrote:

> >   I was planning to keep using the DB directive,
> >  assemble with gpasm -c into an object file,
> >  and loading the data from C.
> 
> 
> It's easy.... No need to mess around with TBLPTRL/H/U, let the compiler
> do all that for you....
> 
> unsigned char __code myData[8] = {1,2,3,4,5,6,7,8};
> unsigned char __code *myDataPointer = myData;
> 
> Sequential access via pointer
> n = *myDataPointer++;
> 
> Random access via array
> n = myData[m];


 Hi Peter,

  thank you very much for your help: __ code worked just fine!

 I've also noticed the same result can be obtained by
 declaring myData as const .

 Both behaviours seems to be undocumented, or maybe
 I'm just missing the right doc.

 Accessing thru a pointer like tou did in your
 example is not working though...

-- 

 Best regards,

 Alessandro Zummo, 
  Tower Technologies - Turin, Italy

  http://www.towertech.it


Previous by date: 6 Aug 2005 18:58:09 +0100 Re: [gnupic] Learning PIC on the job, George M. Gallant, Jr.
Next by date: 6 Aug 2005 18:58:09 +0100 Re: [gnupic] 18F, table read, sdcc, Peter Onion
Previous in thread: 6 Aug 2005 18:58:09 +0100 Re: [gnupic] 18F, table read, sdcc, Peter Onion
Next in thread: 6 Aug 2005 18:58:09 +0100 Re: [gnupic] 18F, table read, sdcc, Peter Onion


Powered by ezmlm-browse 0.20.