DEY (short for "DEcrease Y") is the mnemonic for a machine language instruction which decrements the numerical value of Y index register, by one, and "wraps over" if the value goes below the numerical limits of a byte.
- If the Y index register is taken as an unsigned integer, DEY "counts down" from 255 thru 0/$FF thru $0. If the index register already contains the minimum value of 0/$0 as it is decremented, it "wraps over" to the value 255/$FF.
- If the Y index register is taken as a signed integer, DEY will "count down" from +127 thru −128, or +$7F thru −$80. If the register already contains the value −128/−$80 when it is decremented, it "wraps over" to the value +127/$7F.
Addressing mode[edit | edit source]
CPU flags[edit | edit source]
DEY affects 2 of the CPU's status flags: