[Coco] Clearing condition code register

KnudsenMJ at aol.com KnudsenMJ at aol.com
Mon Mar 28 22:33:40 EST 2005


In a message dated 3/28/05 10:18:04 PM Eastern Standard Time,  
jdaggett at gate.net writes:

The COM  instruction actually inverts the bits and adds zero to the 
memory  location. the result is stored in the memory location. 

Adding zero should clear the carry bit, but then, this sounds like a light  
bulb joke already.  Seriously, the 6809 was known for wasting cycles.


The  NEG does a twos compliment.

Yes, and this could cause a carry if the initial value was 0, since it  would 
change to all 1s and then the addition of 1 to get 2s complement would  carry 
out the left side as all the bits rippled back to 0.
 
Oh well.  I'd believe the manual -- don't recall ever finding an error  in 
it.  --Mike K.
 



More information about the Coco mailing list