LDA

LDA

LDA - load the accumulator with a byte.

Description

LDA loads a byte into the accumulator. If the value is negative, the negative flag will be set. If the value is zero the zero flag will bet set.

Flags affected
N Z C I D V
+ + - - - -
Addressing Mode Assembly OpCode No. Bytes. No. Cycles
Immediate LDA #Oper a9 2 2
Zero Page LDA Oper a5 2 3
Zero Page, X LDA Oper, X b5 2 4
Absolute LDA Oper ad 3 4
Absolute, X LDA Oper, X bd 3 4 [ 1 ]
Absolute, Y LDA Oper, Y b9 3 4 [ 1 ]
(Indirect, X) LDA (Oper, X) a1 2 6
(Indirect), Y LDA (Oper), Y b1 2 5 [ 1 ]

[ 1 ] Add one if page crossed.

Examples

LDA Immediate

LDA #$02;

This will load the accumulator with the hexadecimal number $02

Related Pages

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution 2.5 License.