Atmel AVR Microcontroller discussion group.
[AVR club] now here is a "how come?" - Eric Richards - Jul 24 3:13:05 2006
I never said anything like it, how did you work that out? are you smoking
glue or something
I SAID ON THE DATA SHEETS, IT SAYS and, or, eor MIGHT BRING UP THE 'V' FLAG
I can not bring V flag up, (?and ask why? should it come up?)
----- Original Message -----
From: Dave Hylands
To:
Sent: Monday, July 24, 2006 8:09 AM
Subject: Re: Sorry a error in my last Re: [AVR club] now here is a "how
come?"
Hi Eric,
On 7/23/06, Eric Richards wrote:
> You are right Dave
> if you ADD 128 & 128 you get flags S,V, Z , C flags set.
> How ever if you AND, OR, EOR 128 + 128
> Both AND & OR will only set S, N flag
> While EOR will only set Z (not V as the last email was)
So you're claiming that ANDing 0x01 and 0x02 will not set the Z bit?
I think you're wrong, at least based on the couple simple experiments
I've performed.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: [AVR club] now here is a "how come?" - Dave Hylands - Jul 24 9:49:07 2006
HI Eric,
On 7/24/06, Eric Richards
wrote:
> I never said anything like it, how did you work that out? are you smoking
> glue or something
>
> I SAID ON THE DATA SHEETS, IT SAYS and, or, eor MIGHT BRING UP THE 'V' FLAG
> I can not bring V flag up, (?and ask why? should it come up?)
So which data sheet? what page? I couldn't find anywhere that suggests
that the V flag might be set to 1.
It certainly can be modified. The AVR Instruction Set PDF file shows
that AND, OR, and EOR sets the V flag to zero, so yes it might modify
it. But it will never set it to 1.
Perhaps you're reading more into the datasheet than what it says.
The fact that the V flag is listed in the ATMega32 Instruction Set
Summary just means that the V flag might be modified, which is true.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )