ld

Operands

ld rr,nnnn | ld (rr),r | ld r,nn | ld r,(rr) | ld (nnnn),rr | ld rr,(nnnn) | ld (nnnn),r | ld (rr),nn | ld r,(nnnn) | ld r,r' | ld rr,rr' | ld rr,(rr) | ld (rr),rr | ld (ii+dd),nn | ld r,(ii+dd) | ld (ii+dd),r | ld i,a | ld r,a | ld a,i | ld a,r

Loads nnnn into BC.

Loading...

Variants

Every form of ld the assembler accepts. The cycles column counts clock cycles, written as taken/not taken for the conditional forms.

InstructionDescriptionFlagsBytesCycles
ld bc,nnnn

Loads nnnn into BC.

310
ld (bc),a

Stores A into the memory location pointed to by BC.

17
ld b,nn

Loads nn into B.

27
ld a,(bc)

Loads the value pointed to by BC into A.

17
ld c,nn

Loads nn into C.

27
ld de,nnnn

Loads nnnn into DE.

310
ld (de),a

Stores A into the memory location pointed to by DE.

17
ld d,nn

Loads nn into D.

27
ld a,(de)

Loads the value pointed to by DE into A.

17
ld e,nn

Loads nn into E.

27
ld hl,nnnn

Loads nnnn into HL.

310
ld (nnnn),hl

Stores HL into the memory location pointed to by nnnn.

316
ld h,nn

Loads nn into H.

27
ld hl,(nnnn)

Loads the value pointed to by nnnn into HL.

316
ld l,nn

Loads nn into L.

27
ld sp,nnnn

Loads nnnn into SP.

310
ld (nnnn),a

Stores A into the memory location pointed to by nnnn.

313
ld (hl),nn

Loads nn into (HL).

210
ld a,(nnnn)

Loads the value pointed to by nnnn into A.

313
ld a,nn

Loads nn into A.

27
ld b,b

The contents of B are loaded into B.

14
ld b,c

The contents of C are loaded into B.

14
ld b,d

The contents of D are loaded into B.

14
ld b,e

The contents of E are loaded into B.

14
ld b,h

The contents of H are loaded into B.

14
ld bc,hl undocumented

The contents of HL are loaded into BC.

28
ld b,l

The contents of L are loaded into B.

14
ld b,(hl)

The contents of (HL) are loaded into B.

17
ld b,a

The contents of A are loaded into B.

14
ld c,b

The contents of B are loaded into C.

14
ld c,c

The contents of C are loaded into C.

14
ld c,d

The contents of D are loaded into C.

14
ld c,e

The contents of E are loaded into C.

14
ld c,h

The contents of H are loaded into C.

14
ld c,l

The contents of L are loaded into C.

14
ld c,(hl)

The contents of (HL) are loaded into C.

17
ld bc,(hl) undocumented

The contents of (HL) are loaded into BC.

426
ld c,a

The contents of A are loaded into C.

14
ld d,b

The contents of B are loaded into D.

14
ld de,bc undocumented

The contents of BC are loaded into DE.

28
ld d,c

The contents of C are loaded into D.

14
ld d,d

The contents of D are loaded into D.

14
ld d,e

The contents of E are loaded into D.

14
ld d,h

The contents of H are loaded into D.

14
ld de,hl undocumented

The contents of HL are loaded into DE.

28
ld d,l

The contents of L are loaded into D.

14
ld d,(hl)

The contents of (HL) are loaded into D.

17
ld d,a

The contents of A are loaded into D.

14
ld e,b

The contents of B are loaded into E.

14
ld e,c

The contents of C are loaded into E.

14
ld e,d

The contents of D are loaded into E.

14
ld e,e

The contents of E are loaded into E.

14
ld e,h

The contents of H are loaded into E.

14
ld e,l

The contents of L are loaded into E.

14
ld e,(hl)

The contents of (HL) are loaded into E.

17
ld e,a

The contents of A are loaded into E.

14
ld h,b

The contents of B are loaded into H.

14
ld hl,bc undocumented

The contents of BC are loaded into HL.

28
ld h,c

The contents of C are loaded into H.

14
ld h,d

The contents of D are loaded into H.

14
ld hl,de undocumented

The contents of DE are loaded into HL.

28
ld h,e

The contents of E are loaded into H.

14
ld h,h

The contents of H are loaded into H.

14
ld h,l

The contents of L are loaded into H.

14
ld h,(hl)

The contents of (HL) are loaded into H.

17
ld h,a

The contents of A are loaded into H.

14
ld l,b

The contents of B are loaded into L.

14
ld l,c

The contents of C are loaded into L.

14
ld l,d

The contents of D are loaded into L.

14
ld l,e

The contents of E are loaded into L.

14
ld l,h

The contents of H are loaded into L.

14
ld l,l

The contents of L are loaded into L.

14
ld l,(hl)

The contents of (HL) are loaded into L.

17
ld l,a

The contents of A are loaded into L.

14
ld (hl),b

The contents of B are loaded into (HL).

17
ld (hl),c

The contents of C are loaded into (HL).

17
ld (hl),bc undocumented

The contents of BC are loaded into (HL).

426
ld (hl),d

The contents of D are loaded into (HL).

17
ld (hl),e

The contents of E are loaded into (HL).

17
ld (hl),de undocumented

The contents of DE are loaded into (HL).

426
ld (hl),h

The contents of H are loaded into (HL).

17
ld (hl),l

The contents of L are loaded into (HL).

17
ld (hl),a

The contents of A are loaded into (HL).

17
ld a,b

The contents of B are loaded into A.

14
ld a,c

The contents of C are loaded into A.

14
ld a,d

The contents of D are loaded into A.

14
ld a,e

The contents of E are loaded into A.

14
ld a,h

The contents of H are loaded into A.

14
ld a,l

The contents of L are loaded into A.

14
ld a,(hl)

The contents of (HL) are loaded into A.

17
ld a,a

The contents of A are loaded into A.

14
ld ix,nnnn

Loads nnnn into register IX.

414
ld (nnnn),ix

Stores IX into the memory location pointed to by nnnn.

420
ld ixh,nn undocumented

Loads nn into IXH.

311
ld ix,(nnnn)

Loads the value pointed to by nnnn into IX.

420
ld ixl,nn undocumented

Loads nn into IXL.

311
ld (ix+dd),nn

Stores nn to the memory location pointed to by IX plus dd.

419
ld b,ixh undocumented

The contents of IXH are loaded into B.

28
ld b,ixl undocumented

The contents of IXL are loaded into B.

28
ld b,(ix+dd)

Loads the value pointed to by IX plus dd into B.

319
ld c,ixh undocumented

The contents of IXH are loaded into C.

28
ld c,ixl undocumented

The contents of IXL are loaded into C.

28
ld c,(ix+dd)

Loads the value pointed to by IX plus dd into C.

319
ld d,ixh undocumented

The contents of IXH are loaded into D.

28
ld d,ixl undocumented

The contents of IXL are loaded into D.

28
ld d,(ix+dd)

Loads the value pointed to by IX plus dd into D.

319
ld e,ixh undocumented

The contents of IXH are loaded into E.

28
ld e,ixl undocumented

The contents of IXL are loaded into E.

28
ld e,(ix+dd)

Loads the value pointed to by IX plus dd into E.

319
ld ixh,b undocumented

The contents of B are loaded into IXH.

28
ld ixh,c undocumented

The contents of C are loaded into IXH.

28
ld ixh,d undocumented

The contents of D are loaded into IXH.

28
ld ixh,e undocumented

The contents of E are loaded into IXH.

28
ld ixh,ixh undocumented

The contents of IXH are loaded into IXH.

28
ld ixh,ixl undocumented

The contents of IXL are loaded into IXH.

28
ld h,(ix+dd)

Loads the value pointed to by IX plus dd into H.

319
ld ixh,a undocumented

The contents of A are loaded into IXH.

28
ld ixl,b undocumented

The contents of B are loaded into IXL.

28
ld ixl,c undocumented

The contents of C are loaded into IXL.

28
ld ixl,d undocumented

The contents of D are loaded into IXL.

28
ld ixl,e undocumented

The contents of E are loaded into IXL.

28
ld ixl,ixh undocumented

The contents of IXH are loaded into IXL.

28
ld ixl,ixl undocumented

The contents of IXL are loaded into IXL.

28
ld l,(ix+dd)

Loads the value pointed to by IX plus dd into L.

319
ld ixl,a undocumented

The contents of A are loaded into IXL.

28
ld (ix+dd),b

Stores B to the memory location pointed to by IX plus dd.

319
ld (ix+dd),c

Stores C to the memory location pointed to by IX plus dd.

319
ld (ix+dd),d

Stores D to the memory location pointed to by IX plus dd.

319
ld (ix+dd),e

Stores E to the memory location pointed to by IX plus dd.

319
ld (ix+dd),h

Stores H to the memory location pointed to by IX plus dd.

319
ld (ix+dd),l

Stores L to the memory location pointed to by IX plus dd.

319
ld (ix+dd),a

Stores A to the memory location pointed to by IX plus dd.

319
ld a,ixh undocumented

The contents of IXH are loaded into A.

28
ld a,ixl undocumented

The contents of IXL are loaded into A.

28
ld a,(ix+dd)

Loads the value pointed to by IX plus dd into A.

319
ld sp,ix

Loads the value of IX into SP.

210
ld (nnnn),bc

Stores BC into the memory location pointed to by nnnn.

420
ld i,a

Stores the value of A into register I.

29
ld bc,(nnnn)

Loads the value pointed to by nnnn into BC.

420
ld r,a

Stores the value of A into register R.

29
ld (nnnn),de

Stores DE into the memory location pointed to by nnnn.

420
ld a,i

Stores the value of register I into A.

N=0P/V=*H=0ZS29
ld de,(nnnn)

Loads the value pointed to by nnnn into DE.

420
ld a,r

Stores the value of register R into A.

N=0P/V=*H=0ZS29
ld (nnnn),sp

Stores SP into the memory location pointed to by nnnn.

420
ld sp,(nnnn)

Loads the value pointed to by nnnn into SP.

420
ld sp,hl

Loads the value of HL into SP.

16
ld iy,nnnn

Loads nnnn into register IY.

414
ld (nnnn),iy

Stores IY into the memory location pointed to by nnnn.

420
ld iyh,nn undocumented

Loads nn into IYH.

311
ld iy,(nnnn)

Loads the value pointed to by nnnn into IY.

420
ld iyl,nn undocumented

Loads nn into IYL.

311
ld (iy+dd),nn

Stores nn to the memory location pointed to by IY plus dd.

419
ld b,iyh undocumented

The contents of IYH are loaded into B.

28
ld b,iyl undocumented

The contents of IYL are loaded into B.

28
ld b,(iy+dd)

Loads the value pointed to by IY plus dd into B.

319
ld c,iyh undocumented

The contents of IYH are loaded into C.

28
ld c,iyl undocumented

The contents of IYL are loaded into C.

28
ld c,(iy+dd)

Loads the value pointed to by IY plus dd into C.

319
ld d,iyh undocumented

The contents of IYH are loaded into D.

28
ld d,iyl undocumented

The contents of IYL are loaded into D.

28
ld d,(iy+dd)

Loads the value pointed to by IY plus dd into D.

319
ld e,iyh undocumented

The contents of IYH are loaded into E.

28
ld e,iyl undocumented

The contents of IYL are loaded into E.

28
ld e,(iy+dd)

Loads the value pointed to by IY plus dd into E.

319
ld iyh,b undocumented

The contents of B are loaded into IYH.

28
ld iyh,c undocumented

The contents of C are loaded into IYH.

28
ld iyh,d undocumented

The contents of D are loaded into IYH.

28
ld iyh,e undocumented

The contents of E are loaded into IYH.

28
ld iyh,iyh undocumented

The contents of IYH are loaded into IYH.

28
ld iyh,iyl undocumented

The contents of IYL are loaded into IYH.

28
ld h,(iy+dd)

Loads the value pointed to by IY plus dd into H.

319
ld iyh,a undocumented

The contents of A are loaded into IYH.

28
ld iyl,b undocumented

The contents of B are loaded into IYL.

28
ld iyl,c undocumented

The contents of C are loaded into IYL.

28
ld iyl,d undocumented

The contents of D are loaded into IYL.

28
ld iyl,e undocumented

The contents of E are loaded into IYL.

28
ld iyl,iyh undocumented

The contents of IYH are loaded into IYL.

28
ld iyl,iyl undocumented

The contents of IYL are loaded into IYL.

28
ld l,(iy+dd)

Loads the value pointed to by IY plus dd into L.

319
ld iyl,a undocumented

The contents of A are loaded into IYL.

28
ld (iy+dd),b

Stores B to the memory location pointed to by IY plus dd.

319
ld (iy+dd),c

Stores C to the memory location pointed to by IY plus dd.

319
ld (iy+dd),d

Stores D to the memory location pointed to by IY plus dd.

319
ld (iy+dd),e

Stores E to the memory location pointed to by IY plus dd.

319
ld (iy+dd),h

Stores H to the memory location pointed to by IY plus dd.

319
ld (iy+dd),l

Stores L to the memory location pointed to by IY plus dd.

319
ld (iy+dd),a

Stores A to the memory location pointed to by IY plus dd.

319
ld a,iyh undocumented

The contents of IYH are loaded into A.

28
ld a,iyl undocumented

The contents of IYL are loaded into A.

28
ld a,(iy+dd)

Loads the value pointed to by IY plus dd into A.

319
ld sp,iy

Loads the value of IY into SP.

210