LDX

LDX

LDX - load X

Description

LDX loads a value into the X register.

Flags affected
N Z C I D V
+ + - - - -
Addressing Mode Assembly OpCode No. Bytes. No. Cycles
Immediate LDX #Oper a2 2 2
Zero Page LDX Oper a6 2 3
Zero Page, Y LDX Oper, Y b6 2 4
Absolute LDX Oper ae 3 4
Absolute, Y LDX Oper, Y be 3 4 [ 1 ]

[ 1 ] Add 1 if page crossed.

Examples

LDX #$01

Stores the number 1 in the X register.

Related Pages

  • LDY - load a value into the Y register
  • STX - store the value in the X register
  • TXA - transfer X to the accumulator
  • TXS - transfer X to the stack
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution 2.5 License.