avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Jmp'ing to address / 2?


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Jmp'ing to address / 2?
Date: Thu, 5 Oct 2006 23:26:22 +0200 (MET DST)

Ned Konz <address@hidden> wrote:

> The AVR uses word addresses for program memory (which is more than 1
> byte wide).

Actually, the AVR isn't even sure itself whether it wants to have its
flash 8-bit or 16-bit aligned.  When considering the flash as a source
for opcodes, it thinks everything needs to be handled in terms of
16-bit units, but when it comes to using the flash as a source for
data (i. e. the LPM instruction), it suddenly remembers that it could
be accessed byte-wide.  This leads to the strange situation that the
128 KB flash devices can still use 16-bit addressing for opcodes, but
require 24-bit addressing (RAMPZ + index register pair) for LPM.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]