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


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

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




All 8-bit increments and decrements will affect the z flag (dec b when b = 1 will set z), though they will not affect the carry flag.  All 16-bit increments and decrements (such as dec bc) will not affect *any* flags.  Logical operators clear the carry flag and set the z flag according to the result of the operation.


In a message dated Wed, 18 Jul 2001 11:42:11 AM Eastern Daylight Time, Thomas Lutz <caffeine43@netzero.net> writes:

> 
> 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