[Coco] Clearing condition code register
jdaggett at gate.net
jdaggett at gate.net
Mon Mar 28 22:21:19 EST 2005
Mike
According to the programming manual the COM/NEG instructions does as
I mentioned.
Does not 100% guarentee that I am correct though. The manual can be
wrong. Has happened before.
The COM instruction actually inverts the bits and adds zero to the
memory location. the result is stored in the memory location.
The NEG does a twos compliment.
james
On 28 Mar 2005 at 21:45, KnudsenMJ at aol.com wrote:
From: KnudsenMJ at aol.com
Date sent: Mon, 28 Mar 2005 21:45:51 EST
Subject: Re: [Coco] Clearing condition code register
To: coco at maltedmedia.com
Send reply to: CoCoList for Color Computer Enthusiasts
<coco at maltedmedia.com>
<mailto:coco-
request at maltedmedia.com?subject=unsubscribe>
<mailto:coco-
request at maltedmedia.com?subject=subscribe>
>
> In a message dated 3/27/05 3:17:47 PM Eastern Standard Time,
> jdaggett at gate.net writes:
>
> >The COM instruction will always set the Carry bit. The NEG will set
> >the carry bit if there is a borrow, otherwise it is cleared.
>
>
>
> Are you sure? ISTR that the COM instruction just inverts all the
> bits, and should never set the Carry or Overflow bits.
>
> NEG does a COM and then adds 1, which will set the Carry bit if the
> register was 0 or held the largest negative number (which has no
> positive representation).
>
> But if you've got the 6809 manual handy, then you're right. --Mike
> K.
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
More information about the Coco
mailing list