Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Challenge

2005-06-16 by Dave VanHorn

At 09:37 AM 6/16/2005, Paul Maddox wrote:
>Dave,
>
> > Fine, so ldi R31,high(Table_Loc*2) as above, but what about the low byte?
> > If the low byte has the MSB set on entry, then that needs to get into
> > the LSB of the high byte, no?
>
>Not for me, at least not on the MEGA32 I'm running it on.
>It seems to run fine

Thinking about that again, I understand why it works now, the high 
byte needs to position the table on the low page, IOW XXXXXXXX0
Then we get a 256 byte table from XX00 to XXFF, where XX is XXXXXXX0 
in binary.
I was thinking that it was a 256 WORD table, which it isn't.

>yeah, fair point, but as most of the AVRs don't have 128K of memory it
>shouldn't be an issue.

So, the added proviso that it has to reside in the bottom 64k to work 
with the simple instruction set.
If not, and you try to make it freely relocatable, you end up with a 
lot more cycles.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.