Signed vs unsigned instructions (was Contiguous Arrays)

der Mouse mouse at mcgill-vision.UUCP
Thu Mar 16 20:29:11 AEST 1989


In article <7390 at killer.DALLAS.TX.US>, chasm at killer.DALLAS.TX.US (Charles Marslett) writes:
> In article <9718 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn ) writes:
>> In article <7309 at killer.DALLAS.TX.US> chasm at killer.DALLAS.TX.US (Charles Marslett) writes:
>>> To make it even more serious, I do not know of any twos-complement
>>> computer that even has a signed vs. unsigned add instruction.
>> They are one and the same.
> You fell into the same "oops" I did: the IBM 360 had two different
> instructions (has ...) that differ only in the way the condition
> codes are set (overflow and the like).  So there is a difference.

There's this obscure (:-) machine called a VAX....  The add instruction
sets *two* overflow flags, one indicating (for adds, at least) signed
overflow and the other indicating unsigned overflow.  (It also sets
other flags, but they're irrelevant right now.)  One of the flags is
called a carry flag instead of an overflow flag, but I don't see that
the name makes any difference....

					der Mouse

			old: mcgill-vision!mouse
			new: mouse at larry.mcrcim.mcgill.edu



More information about the Comp.lang.c mailing list