Re: A83: Negative numbers


Re: A83: Negative numbers

What, there a difference? Let's talk bytes here: -1 is the same as 255, right?
Because 255 + 1 = 0 and -1 + 1 = 0. Let's talk words: -1 is the same as 65535.
65535+1 = 0, -1+1=0, -1+65535 = 65534 = -2. You probably know all this before,
because this is the way numbers are stored anyway. The thing is, the assembler
doesn't make any difference between them. That is one great example of the
difference between c and asm: Asm will always work, although not necessarily


On 20-Sep-98, Alan C Johnson wrote:

>How does the processor know when a number is negative?  How does TASM
>compile a negative number as opposed to an unsigned number?  Also, what
>are all of the system flagsand what are their purposes?  All I know now
>are zero, carry and parity.  Can any register set the parity flag?

>You don't need to buy Internet access to use free Internet e-mail.
>Get completely free e-mail from Juno at
>Or call Juno at (800) 654-JUNO [654-5866]