First page Back Continue Last page Overview Graphics

Multibyte Addition


Notes:

When adding byte-sized numbers the carry flag is set by a carry out of bit 7. When adding 16-bit quantities (addd) the carry flag is set by a carry out of bit 15.

The following addition generates a carry and a half carry.
ldaa #$a2
adda #$5f

The following addition generates a carry but not generate half carry.
ldaa #$a2
adda #$55

The following addition does not generate a carry but generate a half carry.
ldaa #$a2
addd #$5f