TXA                TXA Transfer index X to accumulator                TXA

  Operation:  X -> A                                    N V - B D I Z C
                                                        / . . . . . / .

  +----------------+-----------------------+---------+---------+----------+
  | Addressing Mode| Assembly Language Form| OP CODE |No. Bytes|No. Cycles|
  +----------------+-----------------------+---------+---------+----------+
  |  Implied       |   TXA                 |   $8A   |    1    |    2     |
  +----------------+-----------------------+---------+---------+----------+

What it does: Transfers the byte in the X Register to the Accumulator.

Major uses: There are times, after X has been used as a counter, when you'll want to compute something using the value of the counter. And you'll therefore need to transfer the byte in X to the Accumulator. For example, if you search the screen for character $75:

CHARACTER = $75
SCREEN = $0400
         LDX #0
LOOP     LDA SCREENX
         CMP #CHARACTER
         BEQ MORE
         INX
         BEQ NOTFOUND    ; (this prevents an endless loop
MORE     TXA             ; (you now know the character's location)
NOTFOUND BRK
In this example, we want to perform some action based on the location of the character. Perhaps we want to remember the location in a variable for later reference. This will require that we transfer the value of X to the Accumulator so it can be added to the SCREEN start address.