gnupic@linuxhacker.org

gnupic@linuxhacker.org


Subject: Re: Named cblocks?
From: Craig Franklin
Date: 15 Mar 2004 20:22:18 -0600

On Mon, 2004-03-15 at 03:43, David Willmore wrote:
> Hello, all.
> 
> I was just not sleeping and decided to do a bit of coding--
> yes, I know, not recommended.  But, on the good side, I got
> to thinking.  I wanted to BANKSEL between cblocks of variables
> and when I went to type in the 'name' of the cblock, it 
> struck me that there isn't one.  I could use any of the 
> variables in there, but the code would read better if the 
> name indicated the whole *class* of variables I'm about to
> play with.
> 
> Shall I just put in a set of equates to 'name' my cblocks
> or is there some common method of doing this that has not
> occured to my sleep deprived mind?
> 

You have to be careful with CBLOCK.  IIRC, it can cross a bank
boundary.  So your banksel wouldn't be guaranteed to be correct.

If you use relocatable code, data in one section is always in the same
bank, so putting in a dummy symbol for the bank switching works.

> Cheers,
> David
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: gnupic-unsubscribe@linuxhacker.org
> For additional commands, e-mail: gnupic-help@linuxhacker.org
> 


gnupic@linuxhacker.org