DEX                   DEX Decrement index X by one                    DEX

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

  +----------------+-----------------------+---------+---------+----------+
  | Addressing Mode| Assembly Language Form| OP CODE |No. Bytes|No. Cycles|
  +----------------+-----------------------+---------+---------+----------+
  |  Implied       |   DEX                 |   $CA   |    1    |    2     |
  +----------------+-----------------------+---------+---------+----------+

What it does: Reduces the X Register by 1.

Major uses: Used as a counter (an index) within loops. Normally, you LDX with some number (the number of times you want the loop executed) and then DEX:BEQ END as a way of counting events and exiting the loop at the right time.