[Coco] Assembler Question???

Darren A mechacoco at gmail.com
Fri Sep 4 01:58:29 EDT 2009


On 9/3/09, uhmgawa wrote:
> jdaggett at gate.net wrote:
>>
>> Thanks. What that tells me is that negative numbers are represented as
>> their 2's
>> compliment.
>
> Which intuitively seems the sensible thing for
> the assembler to do.  Although I suppose an argument
> could be made for the assembler flagging the
> negative operand as an error in this situation.
>
> In any case the ALU still interprets the data
> as unsigned.  This really boils down to the
> disposition of the carry bit.

---

Yes, but the Negative and Overflow bits are also set in such a way
that the operation can be interpreted as signed.  That is why we end
up with two different conditional branch mnemonics for each of the
relational tests (such as BLO for unsigned and BLT for signed).

Darren



More information about the Coco mailing list