Sign in

username:

password:



Not a member?

Search avrclub



Search tips

Subscribe to avrclub



avrclub by Keywords

AT90S2313 | AT90S8515 | ATMega | ATmega128 | ECL | FETS | IAR | Keyboard | LCD | STK50 | TMOS | UART

Ads

Discussion Groups

Discussion Groups | AVRclub | Repeat of first Email Re: [AVR club] now here is a "how come?"

Atmel AVR Microcontroller discussion group.

Repeat of first Email Re: [AVR club] now here is a "how come?" - Eric Richards - Jul 25 13:38:04 2006

Hi all

How come when you do a "AND" , "OR" , "EOR" when the results is a zero the Z
flag is set
when the result of most significant bit is a 1 then flags S and N are set.
Now there is no "how come" on the about information, it is all very logical.

The "how come" question comes that when you look at the data sheet
(ATmega32) they say flags Z,N,V could be set by the result, (note there is
no mention of flag S)

How come I get flag S to be set and I can not set flag V?
(??? why would you want the "Two's complement overflow indicator" set with
"AND" , "OR" , "EOR" instructions?? )
Am I doing the wrong logic?

Have a great time.
Footnote on status flags reminder:
N is Negative
S is Signed
V is Two's complement overflow indicator
Z is Zero

----- Original Message -----
From: Dave Hylands

So which data sheet? what page?





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