TXA

From C64-Wiki
Jump to navigationJump to search

TXA (short for "Transfer X to Accumulator") is the mnemonic for a machine language instruction which transfers ("copies") the contents of the X index register into the accumulator.

Addressing mode[edit | edit source]

Opcode Addressing
mode
Assembler
format
Length
in bytes
Number of
cycles
Dec Hex
138 8A Implied TXA 1 2

TXA only supports the Implied addressing mode, as shown in the table at right.

CPU flags[edit | edit source]

TXA affects 2 of the CPU's status flags:

  • The negative status flag is set if the byte transferred is negative, i.e. has it's most significant bit set.
  • The zero flag is set if the byte transferred is zero, or cleared if it is non-zero.