We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

Carry Flag: Difference between revisions

From SnesLab
Jump to: navigation, search
(how to set and clear)
(→‎Reference: removed newline)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
The '''Carry Flag''' exists on the [[65c816]].
The '''Carry Flag''' exists on the [[65c816]].


It can be set with [[SEC]] and cleared with [[CLC]].
It can be set with [[SEC]] and cleared with [[CLC]]. Or, [[SEP]] and [[REP]] can be used.
 
The following other 10 instructions have side effects that directly affect the carry flag:
 
* [[ADC]]
* [[ASL]]
* [[CMP]]
* [[CPX]]
* [[CPY]]
* [[LSR]]
* [[ROL]]
* [[ROR]]
* [[SBC]]
* [[XCE]]
 
The following two instructions indirectly affect the carry flag by loading the [[status register]]:
 
* [[PLP]]
* [[RTI]]
 
=== Reference ===
* Labiak, William.  Page 108. https://archive.org/details/Programming_the_65816/page/n118


[[Category:ASM]]
[[Category:ASM]]
[[Category:Flags]]
[[Category:Inherited from 6502]]

Latest revision as of 11:22, 7 December 2023

The Carry Flag exists on the 65c816.

It can be set with SEC and cleared with CLC. Or, SEP and REP can be used.

The following other 10 instructions have side effects that directly affect the carry flag:

The following two instructions indirectly affect the carry flag by loading the status register:

Reference