Re: Problem with opencbm, xu1541 and xubuntu12.04

From: Spiro Trikaliotis <ml-cbmhackers_at_trikaliotis.net>
Date: Thu, 31 May 2012 21:15:36 +0200
Message-ID: <20120531191536.GO13544@trikaliotis.net>
Hello,

* On Thu, May 31, 2012 at 09:39:13AM +0300 Marko Mäkelä wrote:
 
> One wrong thing about the x86 is that it expects and sets the Carry
> flag in the wrong way in SBC operations (subtract with carry). I
> find the 6502 more logical.

Technically, you are right, as the behaviour of the 6502 is exactly what
you get when you do the calculations by hand.

Practically, (almost?) all other CPUs of that time used the carry as
carry/borrow. That is, for subtractions, carry in and carry out were
inverted. It seems people felt better this way, although it is further
away from what the hardware actually does.

I believe the 6502 did not behave this way because MOS did not want to
spare one (or two) XOR for the carry, to make the chip cheaper. The
result is that users of 6502 machines know better what is goinig on
inside the machien - the same way as C64 users were forced to lean more
about the machine in order to use graphics and sound, because the BASIC
was so limited.

Regards,
Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/

       Message was sent through the cbm-hackers mailing list
Received on 2012-05-31 20:00:06

Archive generated by hypermail 2.2.0.