From C64-Wiki
Jump to navigationJump to search
Mnemonic: DEX
2. Schreibweise: {{{2. Schreibweise}}}
Opcode: $CA
Byte count: 1
Command type: Arithmetic- and logic command
Address mode: Implied
register flags:
Negative Flag
Zero Flag
Cycles: 2

The assembler command DEX decrements the content of the X Register by 1.
If X contains 0 overflow occurs and the new value will be 255 ($ff).

Function flow

Ass befehl ca.gif

Explanation of the mnemonic shortcut

DEX DEcrement X register
Decrement X register


Comparison with Basic command

10 X=X-1