[A83] Re: CP 0, dec a, etc...


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

[A83] Re: CP 0, dec a, etc...




INC and DEC of a single byte affect sign. INC and DEC of a word do not
affect sign. INC and DEC never affect carry regardless. For more
information, refer to the Zilog manual, or consult
http://www.ticalc.org/pub/text/z80/z80_reference.txt. Beware of some of the
texts in this directory, as they contain misleading information -- some for
example say that INC and DEC affect carry.

-----Original Message-----
From: assembly-83-bounce@lists.ticalc.org
[mailto:assembly-83-bounce@lists.ticalc.org]On Behalf Of Thomas Lutz
Sent: Wednesday, July 18, 2001 9:35 AM
To: assembly-83@lists.ticalc.org
Subject: [A83] CP 0, dec a, etc...



If I do "dec a" when a=1 will the zero flag be automatically set or do I
need a "cp 0"? Also, all logical commands set/reset the zero flag right?
(i.e. "and", "or", "xor") Will the zero flag be set when other registers
are decremented to 0? (i.e. "dec bc" when bc=1). If so does this apply
to the carry flag as well? Thanks a lot!
-Tom






Follow-Ups: References: