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

XBA: Difference between revisions

From SnesLab
Jump to: navigation, search
(XBA image)
(added syntax)
Line 39: Line 39:
The [[negative flag]] will match the most significant bit of the new low byte (A) of the accumulator.
The [[negative flag]] will match the most significant bit of the new low byte (A) of the accumulator.
The [[zero flag]] will be set if and only if the new low byte (A) of the accumulator is zero, otherwise it is cleared.
The [[zero flag]] will be set if and only if the new low byte (A) of the accumulator is zero, otherwise it is cleared.
==== Syntax ====
<pre>
XBA
</pre>


[[File:xba.png]]
[[File:xba.png]]

Revision as of 16:36, 6 July 2024

Basic Info
Addressing Mode Opcode Length Speed
Implied (type 1) EB 1 byte 3 cycles
Flags Affected
N V M X D I Z C
. . . . . .

XBA is an instruction that exchanges the high byte (B) and low byte (typically called A) of the C accumulator. It works even in 6502 emulation mode. In 65816 native mode, its standard mnemonic is still "XBA" even when the accumulator is 16-bits wide. An alternative mnemonic is "SWA."

The negative flag will match the most significant bit of the new low byte (A) of the accumulator. The zero flag will be set if and only if the new low byte (A) of the accumulator is zero, otherwise it is cleared.

Syntax

XBA

xba.png

See Also

External Links