[Top][All Lists]

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

Re: [avr-gcc-list] pgm_read_byte_far, RAMPZ

From: Erik Christiansen
Subject: Re: [avr-gcc-list] pgm_read_byte_far, RAMPZ
Date: Mon, 27 Jun 2005 12:41:16 +1000
User-agent: Mutt/1.5.6+20040722i

On Sun, Jun 26, 2005 at 01:17:35PM +0200, Torsten Mohr wrote:
> Does this mean i have to save RAMPZ in my interrupt functions?


It's an inviolable principle that an ISR must save (and restore) all
registers that it modifies. Otherwise interrupts vapourise data in your
registers at will. (Even if the background process(es) do not use a
particular register, that may change tomorrow.)

> Or do i put pgm_read_byte_far between cli()/sei() ?

What about the place that RAMPZ is used, that you haven't found yet? ;-)


reply via email to

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