Re: A83: Sbc


[Prev][Next][Index][Thread]

Re: A83: Sbc




On 05-Apr-99, you wrote:


> Hey!

> Sbc is twos complement. It is, issent it? Yes?

> So....the Max value you can subtract from is: 32768  - XXX?

> (i miss my Z80 book...)

> ----------------------
> Bill James Ellis

> B.J.Ellis@hw.ac.uk
> http://www.cee.hw.ac.uk/~ceebje/

Sbc will two's complement one argument and add the result to the other
argument, yes. (And then it subtracts one if carry is set.) In 16 bit sbc,
the numbers can be 0-ffff and in 8 bit sbc they can be 0-ff. It's up to you
to interpret them as signed or unsigned, it works anyways.

Linus
-- 
                                                           wwww 
                                                          (o)(O)
.-->                                           .-------mm--(__)--mm--------.
| Linus Akesson                                | http://linusworld.cjb.net |
`---------------^-- ----- --- --  -- -  -   -  `---------ooO--Ooo----------'
             Madness takes its toll.  Please have exact change.



References: