ff3:ff3us:doc:snes:opcode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ff3:ff3us:doc:snes:opcode [2017/04/12 21:16]
hatzen08 [BIT]
ff3:ff3us:doc:snes:opcode [2022/09/21 18:38] (current)
strotlog undo incorrect changes to c flag: c=1 carries in a 1 in adds; c=1 is set by overflowing
Line 116: Line 116:
 Add or subtract the value in the A or C register with the value in the designed memory address. ADC will add the value and SBC will subtract the value. Add or subtract the value in the A or C register with the value in the designed memory address. ADC will add the value and SBC will subtract the value.
  
-When the carry flag is unset, a value of one will be added in the addition or subtraction operation.+When the carry flag is set, a value of one will be added in the addition or subtraction operation.
  
 The operation can overflow or underflow. It is the coder responsibility to check these cases and adjust the resulting value. A common method is to check the carry flag for overflow or underflow and cap the value to a prefixed setting. The operation can overflow or underflow. It is the coder responsibility to check these cases and adjust the resulting value. A common method is to check the carry flag for overflow or underflow and cap the value to a prefixed setting.
Line 289: Line 289:
 |   D9      |CMP addr,                                              | |   D9      |CMP addr,                                              |
 |   DD      |CMP addr,                                              | |   DD      |CMP addr,                                              |
-|   DF      |CMP long,        |                                       |+|   DF      |CMP long,        |                                       |
  
 ^  Opcode   ^Syntax         ^ Bytes ^Notes                                  | ^  Opcode   ^Syntax         ^ Bytes ^Notes                                  |
  • ff3/ff3us/doc/snes/opcode.1492031783.txt.gz
  • Last modified: 5 years ago
  • (external edit)