Stupid question that's been annoying me

From: Pete Turnbull <pete_at_dunnington.u-net.com>
Date: Sun Sep 30 19:31:27 2001

On Sep 30, 13:54, Cameron Kaiser wrote:
> > Maybe part of the confusion arises because many processors (including
the
> > 8080) complement the carry flag at the end of a subtraction, so that it
can
> > be used directly as a "borrow" flag in multibyte subtractions. Others
> > (like the 6502) don't do that.
>
> I'm not sure what you mean by this, but on my C128,
>
> 1300 ad 01 04 lda $0401
> 1303 38 sec

That's my point: you have to SEC first. You would clear it on most other
processors. Also, after a subtraction, the 6502 sets the carry to 0 if a
borrow was necessary, or to 1 if not; a 6800, 8080, or Z80 does the
opposite.

-- 
Pete						Peter Turnbull
						Network Manager
						University of York
Received on Sun Sep 30 2001 - 19:31:27 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:34:26 BST