View Source Chip8.Interpreter.Instruction.LD (chip8 v1.0.0)

Loads a value into memory, registers, or timers.

Most of the addressing variations simply loads the value of the second operand into the first operand but some posses a special behavior and allow to interact with components that are not accessible through registers or that perform calculations before saving the data, see "Pseudo-registers" section at Chip8.Interpreter.Instruction.Argument.Register for more information.

variants

Variants

OpcodeMnemonicDescription
6xkkLD Vx, byteSet Vx = byte.
8xy0LD Vx, VySet Vx = Vy.
AnnnLD I, addressSet I = address.
Fx07LD Vx, DTSet Vx = DT.
Fx0ALD Vx, KEYWait for a keypress and set Vx = KEY.
Fx15LD DT, VxSet DT = Vx.
Fx18LD ST, VxSet ST = Vx.
Fx29LD FONT, VxSet I = font character addres at Vx.
Fx33LD BCD, VxWrite a binary-coded decimal representation of Vx in memory location I, I + 1, and I + 2.
Fx55LD I, VxWrite the value of registers V0 through Vx in memory, starting at location I.
Fx65LD Vx, IWrite to registers V0 through Vx from memory, starting at location I.