Z80 Complete Documentation

Instructions

adc adc r,r' | adc r | adc r,(rr) | adc (rr) | adc r,nn | adc nn | adc r,(ii+dd) | adc (ii+dd) | adc rr,rr'

Adds B and the carry flag to A.

adc a,b

Adds C and the carry flag to A.

adc a,c

Adds D and the carry flag to A.

adc a,d

Adds E and the carry flag to A.

adc a,e

Adds H and the carry flag to A.

adc a,h

Adds L and the carry flag to A.

adc a,l

Adds (HL) and the carry flag to A.

adc a,(hl)

Adds A and the carry flag to A.

adc a,a

Adds nn and the carry flag to A.

adc a,nn

Adds IXH and the carry flag to A.

adc a,ixh

Adds IXL and the carry flag to A.

adc a,ixl

Adds the value pointed to by IX plus dd and the carry flag to A.

adc a,(ix+dd)

Adds BC and the carry flag to HL.

adc hl,bc

Adds DE and the carry flag to HL.

adc hl,de

Adds HL and the carry flag to HL.

adc hl,hl

Adds SP and the carry flag to HL.

adc hl,sp

Adds IYH and the carry flag to A.

adc a,iyh

Adds IYL and the carry flag to A.

adc a,iyl

Adds the value pointed to by IY plus dd and the carry flag to A.

adc a,(iy+dd)

add add rr,rr' | add r,r' | add r | add r,(rr) | add (rr) | add r,nn | add nn | add r,(ii+dd) | add (ii+dd)

The value of BC is added to HL.

add hl,bc

The value of DE is added to HL.

add hl,de

The value of HL is added to HL.

add hl,hl

The value of SP is added to HL.

add hl,sp

Adds B to A.

add a,b

Adds C to A.

add a,c

Adds D to A.

add a,d

Adds E to A.

add a,e

Adds H to A.

add a,h

Adds L to A.

add a,l

Adds (HL) to A.

add a,(hl)

Adds A to A.

add a,a

Adds nn to A.

add a,nn

The value of BC is added to IX.

add ix,bc

The value of DE is added to IX.

add ix,de

The value of IX is added to IX.

add ix,ix

The value of SP is added to IX.

add ix,sp

Adds IXH to A.

add a,ixh

Adds IXL to A.

add a,ixl

Adds the value pointed to by IX plus dd to A.

add a,(ix+dd)

The value of BC is added to IY.

add iy,bc

The value of DE is added to IY.

add iy,de

The value of IY is added to IY.

add iy,iy

The value of SP is added to IY.

add iy,sp

Adds IYH to A.

add a,iyh

Adds IYL to A.

add a,iyl

Adds the value pointed to by IY plus dd to A.

add a,(iy+dd)

and and r | and r,r' | and (rr) | and r,(rr) | and (ii+dd) | and r,(ii+dd) | and nn | and r,nn

Bitwise AND on A with B.

and b

Bitwise AND on A with C.

and c

Bitwise AND on A with D.

and d

Bitwise AND on A with E.

and e

Bitwise AND on A with H.

and h

Bitwise AND on A with L.

and l

Bitwise AND on A with (HL).

and (hl)

Bitwise AND on A with A.

and a

Bitwise AND on A with IXH.

and ixh

Bitwise AND on A with IXL.

and ixl

Bitwise AND on A with the value pointed to by IX plus dd.

and (ix+dd)

Bitwise AND on A with nn.

and nn

Bitwise AND on A with IYH.

and iyh

Bitwise AND on A with IYL.

and iyl

Bitwise AND on A with the value pointed to by IY plus dd.

and (iy+dd)

bit bit bit,r | bit bit,(rr) | bit bit,(ii+dd)

Tests bit 0 of B.

bit 0,b

Tests bit 0 of C.

bit 0,c

Tests bit 0 of D.

bit 0,d

Tests bit 0 of E.

bit 0,e

Tests bit 0 of H.

bit 0,h

Tests bit 0 of L.

bit 0,l

Tests bit 0 of (HL).

bit 0,(hl)

Tests bit 0 of A.

bit 0,a

Tests bit 1 of B.

bit 1,b

Tests bit 1 of C.

bit 1,c

Tests bit 1 of D.

bit 1,d

Tests bit 1 of E.

bit 1,e

Tests bit 1 of H.

bit 1,h

Tests bit 1 of L.

bit 1,l

Tests bit 1 of (HL).

bit 1,(hl)

Tests bit 1 of A.

bit 1,a

Tests bit 2 of B.

bit 2,b

Tests bit 2 of C.

bit 2,c

Tests bit 2 of D.

bit 2,d

Tests bit 2 of E.

bit 2,e

Tests bit 2 of H.

bit 2,h

Tests bit 2 of L.

bit 2,l

Tests bit 2 of (HL).

bit 2,(hl)

Tests bit 2 of A.

bit 2,a

Tests bit 3 of B.

bit 3,b

Tests bit 3 of C.

bit 3,c

Tests bit 3 of D.

bit 3,d

Tests bit 3 of E.

bit 3,e

Tests bit 3 of H.

bit 3,h

Tests bit 3 of L.

bit 3,l

Tests bit 3 of (HL).

bit 3,(hl)

Tests bit 3 of A.

bit 3,a

Tests bit 4 of B.

bit 4,b

Tests bit 4 of C.

bit 4,c

Tests bit 4 of D.

bit 4,d

Tests bit 4 of E.

bit 4,e

Tests bit 4 of H.

bit 4,h

Tests bit 4 of L.

bit 4,l

Tests bit 4 of (HL).

bit 4,(hl)

Tests bit 4 of A.

bit 4,a

Tests bit 5 of B.

bit 5,b

Tests bit 5 of C.

bit 5,c

Tests bit 5 of D.

bit 5,d

Tests bit 5 of E.

bit 5,e

Tests bit 5 of H.

bit 5,h

Tests bit 5 of L.

bit 5,l

Tests bit 5 of (HL).

bit 5,(hl)

Tests bit 5 of A.

bit 5,a

Tests bit 6 of B.

bit 6,b

Tests bit 6 of C.

bit 6,c

Tests bit 6 of D.

bit 6,d

Tests bit 6 of E.

bit 6,e

Tests bit 6 of H.

bit 6,h

Tests bit 6 of L.

bit 6,l

Tests bit 6 of (HL).

bit 6,(hl)

Tests bit 6 of A.

bit 6,a

Tests bit 7 of B.

bit 7,b

Tests bit 7 of C.

bit 7,c

Tests bit 7 of D.

bit 7,d

Tests bit 7 of E.

bit 7,e

Tests bit 7 of H.

bit 7,h

Tests bit 7 of L.

bit 7,l

Tests bit 7 of (HL).

bit 7,(hl)

Tests bit 7 of A.

bit 7,a

Tests bit 0 of the memory location pointed to by IX plus dd.

bit 0,(ix+dd)

Tests bit 1 of the memory location pointed to by IX plus dd.

bit 1,(ix+dd)

Tests bit 2 of the memory location pointed to by IX plus dd.

bit 2,(ix+dd)

Tests bit 3 of the memory location pointed to by IX plus dd.

bit 3,(ix+dd)

Tests bit 4 of the memory location pointed to by IX plus dd.

bit 4,(ix+dd)

Tests bit 5 of the memory location pointed to by IX plus dd.

bit 5,(ix+dd)

Tests bit 6 of the memory location pointed to by IX plus dd.

bit 6,(ix+dd)

Tests bit 7 of the memory location pointed to by IX plus dd.

bit 7,(ix+dd)

Tests bit 0 of the memory location pointed to by IY plus dd.

bit 0,(iy+dd)

Tests bit 1 of the memory location pointed to by IY plus dd.

bit 1,(iy+dd)

Tests bit 2 of the memory location pointed to by IY plus dd.

bit 2,(iy+dd)

Tests bit 3 of the memory location pointed to by IY plus dd.

bit 3,(iy+dd)

Tests bit 4 of the memory location pointed to by IY plus dd.

bit 4,(iy+dd)

Tests bit 5 of the memory location pointed to by IY plus dd.

bit 5,(iy+dd)

Tests bit 6 of the memory location pointed to by IY plus dd.

bit 6,(iy+dd)

Tests bit 7 of the memory location pointed to by IY plus dd.

bit 7,(iy+dd)

call call cc,nnnn | call nnnn

If the zero flag is unset, the current PC value plus three is pushed onto the stack, then is loaded with nnnn.

call nz,nnnn

If the zero flag is set, the current PC value plus three is pushed onto the stack, then is loaded with nnnn.

call z,nnnn

The current PC value plus three is pushed onto the stack, then is loaded with nnnn.

call nnnn

If the carry flag is unset, the current PC value plus three is pushed onto the stack, then is loaded with nnnn.

call nc,nnnn

If the carry flag is set, the current PC value plus three is pushed onto the stack, then is loaded with nnnn.

call c,nnnn

If the parity/overflow flag is unset, the current PC value plus three is pushed onto the stack, then is loaded with nnnn.

call po,nnnn

If the parity/overflow flag is set, the current PC value plus three is pushed onto the stack, then is loaded with nnnn.

call pe,nnnn

If the sign flag is unset, the current PC value plus three is pushed onto the stack, then is loaded with nnnn.

call p,nnnn

If the sign flag is set, the current PC value plus three is pushed onto the stack, then is loaded with nnnn.

call m,nnnn

ccf ccf

Inverts the carry flag.

ccf

cp cp r | cp r,r' | cp (rr) | cp r,(rr) | cp (ii+dd) | cp r,(ii+dd) | cp nn | cp r,nn

Subtracts B from A and affects flags according to the result. A is not modified.

cp b

Subtracts C from A and affects flags according to the result. A is not modified.

cp c

Subtracts D from A and affects flags according to the result. A is not modified.

cp d

Subtracts E from A and affects flags according to the result. A is not modified.

cp e

Subtracts H from A and affects flags according to the result. A is not modified.

cp h

Subtracts L from A and affects flags according to the result. A is not modified.

cp l

Subtracts (HL) from A and affects flags according to the result. A is not modified.

cp (hl)

Subtracts A from A and affects flags according to the result. A is not modified.

cp a

Subtracts IXH from A and affects flags according to the result. A is not modified.

cp ixh

Subtracts IXL from A and affects flags according to the result. A is not modified.

cp ixl

Subtracts the value pointed to by IX plus dd from A and affects flags according to the result. A is not modified.

cp (ix+dd)

Subtracts IYH from A and affects flags according to the result. A is not modified.

cp iyh

Subtracts IYL from A and affects flags according to the result. A is not modified.

cp iyl

Subtracts the value pointed to by IY plus dd from A and affects flags according to the result. A is not modified.

cp (iy+dd)

Subtracts nn from A and affects flags according to the result. A is not modified.

cp nn

cpd cpd

Compares the value of the memory location pointed to by HL with A. Then HL and BC are decremented. p/v is reset if BC becomes zero and set otherwise.

cpd

cpdr cpdr

Compares the value of the memory location pointed to by HL with A. Then HL and BC are decremented. If BC is not zero and z is not set, this operation is repeated. p/v is reset if BC becomes zero and set otherwise, acting as an indicator that HL reached a memory location whose value equalled A before the counter went to zero. Interrupts can trigger while this instruction is processing.

cpdr

cpi cpi

Compares the value of the memory location pointed to by HL with A. Then HL is incremented and BC is decremented. p/v is reset if BC becomes zero and set otherwise.

cpi

cpir cpir

Compares the value of the memory location pointed to by HL with A. Then HL is incremented and BC is decremented. If BC is not zero and z is not set, this operation is repeated. p/v is reset if BC becomes zero and set otherwise, acting as an indicator that HL reached a memory location whose value equalled A before the counter went to zero. Interrupts can trigger while this instruction is processing.

cpir

cpl cpl

The contents of A are inverted (one's complement).

cpl

daa daa

Adjusts A for BCD addition and subtraction operations.

daa

dec dec r | dec rr | dec (rr) | dec (ii+dd)

Subtracts one from B.

dec b

Subtracts one from BC.

dec bc

Subtracts one from C.

dec c

Subtracts one from D.

dec d

Subtracts one from DE.

dec de

Subtracts one from E.

dec e

Subtracts one from H.

dec h

Subtracts one from HL.

dec hl

Subtracts one from L.

dec l

Subtracts one from (HL).

dec (hl)

Subtracts one from SP.

dec sp

Subtracts one from A.

dec a

Subtracts one from IXH.

dec ixh

Subtracts one from IX.

dec ix

Subtracts one from IXL.

dec ixl

Subtracts one from the memory location pointed to by IX plus dd.

dec (ix+dd)

Subtracts one from IYH.

dec iyh

Subtracts one from IY.

dec iy

Subtracts one from IYL.

dec iyl

Subtracts one from the memory location pointed to by IY plus dd.

dec (iy+dd)

di di

Resets both interrupt flip-flops, thus preventing maskable interrupts from triggering.

di

djnz djnz offset

The B register is decremented, and if not zero, the signed value offset is added to PC. The jump is measured from the start of the instruction opcode.

djnz offset

ei ei

Sets both interrupt flip-flops, thus allowing maskable interrupts to occur. An interrupt will not occur until after the immediately following instruction.

ei

ex ex rr,rr' | ex (rr),rr | ex rr,(rr)

Exchanges the 16-bit contents of AF and AF'.

ex af,af'

Exchanges (SP) with IXL, and (SP+1) with IXH.

ex (sp),ix

Exchanges (SP) with L, and (SP+1) with H.

ex (sp),hl

Exchanges the 16-bit contents of DE and HL.

ex de,hl

Exchanges (SP) with IYL, and (SP+1) with IYH.

ex (sp),iy

exx exx

Exchanges the 16-bit contents of BC, DE, and HL with BC', DE', and HL'.

exx

halt halt

Suspends CPU operation until an interrupt or reset occurs.

halt

im im 0 | im 1 | im 2

Sets interrupt mode 0.

im 0

Sets interrupt mode 1.

im 1

Sets interrupt mode 2.

im 2

in in r,(nn) | in r,nn | in r,(rr) | in (rr)

A byte from the port whose address is formed by A in the high bits and nn in the low bits is written to A.

in a,(nn)

A byte from the port at the 16-bit address contained in the BC register pair is written to B.

in b,(c)

A byte from the port at the 16-bit address contained in the BC register pair is written to C.

in c,(c)

A byte from the port at the 16-bit address contained in the BC register pair is written to D.

in d,(c)

A byte from the port at the 16-bit address contained in the BC register pair is written to E.

in e,(c)

A byte from the port at the 16-bit address contained in the BC register pair is written to H.

in h,(c)

A byte from the port at the 16-bit address contained in the BC register pair is written to L.

in l,(c)

Inputs a byte from the port at the 16-bit address contained in the BC register pair and affects flags only.

in (c)

A byte from the port at the 16-bit address contained in the BC register pair is written to A.

in a,(c)

inc inc rr | inc r | inc (rr) | inc (ii+dd)

Adds one to BC.

inc bc

Adds one to B.

inc b

Adds one to C.

inc c

Adds one to DE.

inc de

Adds one to D.

inc d

Adds one to E.

inc e

Adds one to HL.

inc hl

Adds one to H.

inc h

Adds one to L.

inc l

Adds one to SP.

inc sp

Adds one to (HL).

inc (hl)

Adds one to A.

inc a

Adds one to IX.

inc ix

Adds one to IXH.

inc ixh

Adds one to IXL.

inc ixl

Adds one to the memory location pointed to by IX plus dd.

inc (ix+dd)

Adds one to IY.

inc iy

Adds one to IYH.

inc iyh

Adds one to IYL.

inc iyl

Adds one to the memory location pointed to by IY plus dd.

inc (iy+dd)

ind ind

A byte from the port at the 16-bit address contained in the BC register pair is written to the memory location pointed to by HL. Then HL and B are decremented. Note that the carry flag may be affected, contrary to documentation. Read More

ind

indr indr

A byte from the port at the 16-bit address contained in the BC register pair is written to the memory location pointed to by HL. Then HL and B are decremented. If B is not zero, this operation is repeated. Interrupts can trigger while this instruction is processing. Note that the carry flag may be affected, contrary to documentation. Read More

indr

ini ini

A byte from the port at the 16-bit address contained in the BC register pair is written to the memory location pointed to by HL. Then HL is incremented and B is decremented. Note that the carry flag may be affected, contrary to documentation. Read More

ini

inir inir

A byte from the port at the 16-bit address contained in the BC register pair is written to the memory location pointed to by HL. Then HL is incremented and B is decremented. If B is not zero, this operation is repeated. Interrupts can trigger while this instruction is processing. Note that the carry flag may be affected, contrary to documentation. Read More

inir

jp jp cc,nnnn | jp nnnn | jp (rr) | jp rr

If the zero flag is unset, nnnn is copied to PC.

jp nz,nnnn

nnnn is copied to PC.

jp nnnn

If the zero flag is set, nnnn is copied to PC.

jp z,nnnn

If the carry flag is unset, nnnn is copied to PC.

jp nc,nnnn

If the carry flag is set, nnnn is copied to PC.

jp c,nnnn

Loads the value of IX into PC.

jp (ix)

If the parity/overflow flag is unset, nnnn is copied to PC.

jp po,nnnn

Loads the value of HL into PC.

jp (hl)

If the parity/overflow flag is set, nnnn is copied to PC.

jp pe,nnnn

If the sign flag is unset, nnnn is copied to PC.

jp p,nnnn

If the sign flag is set, nnnn is copied to PC.

jp m,nnnn

Loads the value of IY into PC.

jp (iy)

jr jr offset | jr cc,offset

The signed value offset is added to PC. The jump is measured from the start of the instruction opcode.

jr offset

If the zero flag is unset, the signed value offset is added to PC. The jump is measured from the start of the instruction opcode.

jr nz,offset

If the zero flag is set, the signed value offset is added to PC. The jump is measured from the start of the instruction opcode.

jr z,offset

If the carry flag is unset, the signed value offset is added to PC. The jump is measured from the start of the instruction opcode.

jr nc,offset

If the carry flag is set, the signed value offset is added to PC. The jump is measured from the start of the instruction opcode.

jr c,offset

ld 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.

ld bc,nnnn

Stores A into the memory location pointed to by BC.

ld (bc),a

Loads nn into B.

ld b,nn

Loads the value pointed to by BC into A.

ld a,(bc)

Loads nn into C.

ld c,nn

Loads nnnn into DE.

ld de,nnnn

Stores A into the memory location pointed to by DE.

ld (de),a

Loads nn into D.

ld d,nn

Loads the value pointed to by DE into A.

ld a,(de)

Loads nn into E.

ld e,nn

Loads nnnn into HL.

ld hl,nnnn

Stores HL into the memory location pointed to by nnnn.

ld (nnnn),hl

Loads nn into H.

ld h,nn

Loads the value pointed to by nnnn into HL.

ld hl,(nnnn)

Loads nn into L.

ld l,nn

Loads nnnn into SP.

ld sp,nnnn

Stores A into the memory location pointed to by nnnn.

ld (nnnn),a

Loads nn into (HL).

ld (hl),nn

Loads the value pointed to by nnnn into A.

ld a,(nnnn)

Loads nn into A.

ld a,nn

The contents of B are loaded into B.

ld b,b

The contents of C are loaded into B.

ld b,c

The contents of D are loaded into B.

ld b,d

The contents of E are loaded into B.

ld b,e

The contents of H are loaded into B.

ld b,h

The contents of HL are loaded into BC.

ld bc,hl

The contents of L are loaded into B.

ld b,l

The contents of (HL) are loaded into B.

ld b,(hl)

The contents of A are loaded into B.

ld b,a

The contents of B are loaded into C.

ld c,b

The contents of C are loaded into C.

ld c,c

The contents of D are loaded into C.

ld c,d

The contents of E are loaded into C.

ld c,e

The contents of H are loaded into C.

ld c,h

The contents of L are loaded into C.

ld c,l

The contents of (HL) are loaded into C.

ld c,(hl)

The contents of (HL) are loaded into BC.

ld bc,(hl)

The contents of A are loaded into C.

ld c,a

The contents of B are loaded into D.

ld d,b

The contents of BC are loaded into DE.

ld de,bc

The contents of C are loaded into D.

ld d,c

The contents of D are loaded into D.

ld d,d

The contents of E are loaded into D.

ld d,e

The contents of H are loaded into D.

ld d,h

The contents of HL are loaded into DE.

ld de,hl

The contents of L are loaded into D.

ld d,l

The contents of (HL) are loaded into D.

ld d,(hl)

The contents of A are loaded into D.

ld d,a

The contents of B are loaded into E.

ld e,b

The contents of C are loaded into E.

ld e,c

The contents of D are loaded into E.

ld e,d

The contents of E are loaded into E.

ld e,e

The contents of H are loaded into E.

ld e,h

The contents of L are loaded into E.

ld e,l

The contents of (HL) are loaded into E.

ld e,(hl)

The contents of A are loaded into E.

ld e,a

The contents of B are loaded into H.

ld h,b

The contents of BC are loaded into HL.

ld hl,bc

The contents of C are loaded into H.

ld h,c

The contents of D are loaded into H.

ld h,d

The contents of DE are loaded into HL.

ld hl,de

The contents of E are loaded into H.

ld h,e

The contents of H are loaded into H.

ld h,h

The contents of L are loaded into H.

ld h,l

The contents of (HL) are loaded into H.

ld h,(hl)

The contents of A are loaded into H.

ld h,a

The contents of B are loaded into L.

ld l,b

The contents of C are loaded into L.

ld l,c

The contents of D are loaded into L.

ld l,d

The contents of E are loaded into L.

ld l,e

The contents of H are loaded into L.

ld l,h

The contents of L are loaded into L.

ld l,l

The contents of (HL) are loaded into L.

ld l,(hl)

The contents of A are loaded into L.

ld l,a

The contents of B are loaded into (HL).

ld (hl),b

The contents of C are loaded into (HL).

ld (hl),c

The contents of BC are loaded into (HL).

ld (hl),bc

The contents of D are loaded into (HL).

ld (hl),d

The contents of E are loaded into (HL).

ld (hl),e

The contents of DE are loaded into (HL).

ld (hl),de

The contents of H are loaded into (HL).

ld (hl),h

The contents of L are loaded into (HL).

ld (hl),l

The contents of A are loaded into (HL).

ld (hl),a

The contents of B are loaded into A.

ld a,b

The contents of C are loaded into A.

ld a,c

The contents of D are loaded into A.

ld a,d

The contents of E are loaded into A.

ld a,e

The contents of H are loaded into A.

ld a,h

The contents of L are loaded into A.

ld a,l

The contents of (HL) are loaded into A.

ld a,(hl)

The contents of A are loaded into A.

ld a,a

Loads nnnn into register IX.

ld ix,nnnn

Stores IX into the memory location pointed to by nnnn.

ld (nnnn),ix

Loads nn into IXH.

ld ixh,nn

Loads the value pointed to by nnnn into IX.

ld ix,(nnnn)

Loads nn into IXL.

ld ixl,nn

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

ld (ix+dd),nn

The contents of IXH are loaded into B.

ld b,ixh

The contents of IXL are loaded into B.

ld b,ixl

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

ld b,(ix+dd)

The contents of IXH are loaded into C.

ld c,ixh

The contents of IXL are loaded into C.

ld c,ixl

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

ld c,(ix+dd)

The contents of IXH are loaded into D.

ld d,ixh

The contents of IXL are loaded into D.

ld d,ixl

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

ld d,(ix+dd)

The contents of IXH are loaded into E.

ld e,ixh

The contents of IXL are loaded into E.

ld e,ixl

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

ld e,(ix+dd)

The contents of B are loaded into IXH.

ld ixh,b

The contents of C are loaded into IXH.

ld ixh,c

The contents of D are loaded into IXH.

ld ixh,d

The contents of E are loaded into IXH.

ld ixh,e

The contents of IXH are loaded into IXH.

ld ixh,ixh

The contents of IXL are loaded into IXH.

ld ixh,ixl

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

ld h,(ix+dd)

The contents of A are loaded into IXH.

ld ixh,a

The contents of B are loaded into IXL.

ld ixl,b

The contents of C are loaded into IXL.

ld ixl,c

The contents of D are loaded into IXL.

ld ixl,d

The contents of E are loaded into IXL.

ld ixl,e

The contents of IXH are loaded into IXL.

ld ixl,ixh

The contents of IXL are loaded into IXL.

ld ixl,ixl

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

ld l,(ix+dd)

The contents of A are loaded into IXL.

ld ixl,a

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

ld (ix+dd),b

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

ld (ix+dd),c

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

ld (ix+dd),d

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

ld (ix+dd),e

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

ld (ix+dd),h

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

ld (ix+dd),l

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

ld (ix+dd),a

The contents of IXH are loaded into A.

ld a,ixh

The contents of IXL are loaded into A.

ld a,ixl

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

ld a,(ix+dd)

Loads the value of IX into SP.

ld sp,ix

Stores BC into the memory location pointed to by nnnn.

ld (nnnn),bc

Stores the value of A into register I.

ld i,a

Loads the value pointed to by nnnn into BC.

ld bc,(nnnn)

Stores the value of A into register R.

ld r,a

Stores DE into the memory location pointed to by nnnn.

ld (nnnn),de

Stores the value of register I into A.

ld a,i

Loads the value pointed to by nnnn into DE.

ld de,(nnnn)

Stores the value of register R into A.

ld a,r

Stores SP into the memory location pointed to by nnnn.

ld (nnnn),sp

Loads the value pointed to by nnnn into SP.

ld sp,(nnnn)

Loads the value of HL into SP.

ld sp,hl

Loads nnnn into register IY.

ld iy,nnnn

Stores IY into the memory location pointed to by nnnn.

ld (nnnn),iy

Loads nn into IYH.

ld iyh,nn

Loads the value pointed to by nnnn into IY.

ld iy,(nnnn)

Loads nn into IYL.

ld iyl,nn

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

ld (iy+dd),nn

The contents of IYH are loaded into B.

ld b,iyh

The contents of IYL are loaded into B.

ld b,iyl

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

ld b,(iy+dd)

The contents of IYH are loaded into C.

ld c,iyh

The contents of IYL are loaded into C.

ld c,iyl

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

ld c,(iy+dd)

The contents of IYH are loaded into D.

ld d,iyh

The contents of IYL are loaded into D.

ld d,iyl

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

ld d,(iy+dd)

The contents of IYH are loaded into E.

ld e,iyh

The contents of IYL are loaded into E.

ld e,iyl

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

ld e,(iy+dd)

The contents of B are loaded into IYH.

ld iyh,b

The contents of C are loaded into IYH.

ld iyh,c

The contents of D are loaded into IYH.

ld iyh,d

The contents of E are loaded into IYH.

ld iyh,e

The contents of IYH are loaded into IYH.

ld iyh,iyh

The contents of IYL are loaded into IYH.

ld iyh,iyl

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

ld h,(iy+dd)

The contents of A are loaded into IYH.

ld iyh,a

The contents of B are loaded into IYL.

ld iyl,b

The contents of C are loaded into IYL.

ld iyl,c

The contents of D are loaded into IYL.

ld iyl,d

The contents of E are loaded into IYL.

ld iyl,e

The contents of IYH are loaded into IYL.

ld iyl,iyh

The contents of IYL are loaded into IYL.

ld iyl,iyl

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

ld l,(iy+dd)

The contents of A are loaded into IYL.

ld iyl,a

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

ld (iy+dd),b

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

ld (iy+dd),c

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

ld (iy+dd),d

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

ld (iy+dd),e

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

ld (iy+dd),h

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

ld (iy+dd),l

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

ld (iy+dd),a

The contents of IYH are loaded into A.

ld a,iyh

The contents of IYL are loaded into A.

ld a,iyl

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

ld a,(iy+dd)

Loads the value of IY into SP.

ld sp,iy

ldd ldd

Transfers a byte of data from the memory location pointed to by HL to the memory location pointed to by DE. Then HL, DE, and BC are decremented. p/v is reset if BC becomes zero and set otherwise.

ldd

lddr lddr

Transfers a byte of data from the memory location pointed to by HL to the memory location pointed to by DE. Then HL, DE, and BC are decremented. If BC is not zero, this operation is repeated. Interrupts can trigger while this instruction is processing.

lddr

ldi ldi

Transfers a byte of data from the memory location pointed to by HL to the memory location pointed to by DE. Then HL and DE are incremented and BC is decremented. p/v is reset if BC becomes zero and set otherwise.

ldi

ldir ldir

Transfers a byte of data from the memory location pointed to by HL to the memory location pointed to by DE. Then HL and DE are incremented and BC is decremented. If BC is not zero, this operation is repeated. Interrupts can trigger while this instruction is processing.

ldir

neg neg

The contents of A are negated (two's complement). Operation is the same as subtracting A from zero.

neg

nop nop

No operation is performed.

nop

or or r | or r,r' | or (rr) | or r,(rr) | or (ii+dd) | or r,(ii+dd) | or nn | or r,nn

Bitwise OR on A with B.

or b

Bitwise OR on A with C.

or c

Bitwise OR on A with D.

or d

Bitwise OR on A with E.

or e

Bitwise OR on A with H.

or h

Bitwise OR on A with L.

or l

Bitwise OR on A with (HL).

or (hl)

Bitwise OR on A with A.

or a

Bitwise OR on A with IXH.

or ixh

Bitwise OR on A with IXL.

or ixl

Bitwise OR on A with the value pointed to by IX plus dd.

or (ix+dd)

Bitwise OR on A with nn.

or nn

Bitwise OR on A with IYH.

or iyh

Bitwise OR on A with IYL.

or iyl

Bitwise OR on A with the value pointed to by IY plus dd.

or (iy+dd)

otdr otdr

B is decremented. A byte from the memory location pointed to by HL is written to the port at the 16-bit address contained in the BC register pair. Then HL is decremented. If B is not zero, this operation is repeated. Interrupts can trigger while this instruction is processing. Note that the carry flag may be affected, contrary to documentation. Read More

otdr

otir otir

B is decremented. A byte from the memory location pointed to by HL is written to the port at the 16-bit address contained in the BC register pair. Then HL is incremented. If B is not zero, this operation is repeated. Interrupts can trigger while this instruction is processing. Note that the carry flag may be affected, contrary to documentation. Read More

otir

out out (nn),r | out nn,r | out (rr),r | out (rr),0

The value of A is written to the port whose address is formed by A in the high bits and nn in the low bits.

out (nn),a

The value of B is written to the port at the 16-bit address contained in the BC register pair.

out (c),b

The value of C is written to the port at the 16-bit address contained in the BC register pair.

out (c),c

The value of D is written to the port at the 16-bit address contained in the BC register pair.

out (c),d

The value of E is written to the port at the 16-bit address contained in the BC register pair.

out (c),e

The value of H is written to the port at the 16-bit address contained in the BC register pair.

out (c),h

The value of L is written to the port at the 16-bit address contained in the BC register pair.

out (c),l

Outputs a zero (on NMOS Z80s) or 255 (on CMOS Z80s) to the port at the 16-bit address contained in the BC register pair. Read More

out (c),0

The value of A is written to the port at the 16-bit address contained in the BC register pair.

out (c),a

outd outd

B is decremented. A byte from the memory location pointed to by HL is written to the port at the 16-bit address contained in the BC register pair. Then HL is decremented. Note that the carry flag may be affected, contrary to documentation. Read More

outd

outi outi

B is decremented. A byte from the memory location pointed to by HL is written to the port at the 16-bit address contained in the BC register pair. Then HL is incremented. Note that the carry flag may be affected, contrary to documentation. Read More

outi

pop pop rr

The memory location pointed to by SP is stored into C and SP is incremented. The memory location pointed to by SP is stored into B and SP is incremented again.

pop bc

The memory location pointed to by SP is stored into E and SP is incremented. The memory location pointed to by SP is stored into D and SP is incremented again.

pop de

The memory location pointed to by SP is stored into IXL and SP is incremented. The memory location pointed to by SP is stored into IXH and SP is incremented again.

pop ix

The memory location pointed to by SP is stored into L and SP is incremented. The memory location pointed to by SP is stored into H and SP is incremented again.

pop hl

The memory location pointed to by SP is stored into F and SP is incremented. The memory location pointed to by SP is stored into A and SP is incremented again.

pop af

The memory location pointed to by SP is stored into IYL and SP is incremented. The memory location pointed to by SP is stored into IYH and SP is incremented again.

pop iy

push push rr

SP is decremented and B is stored into the memory location pointed to by SP. SP is decremented again and C is stored into the memory location pointed to by SP.

push bc

SP is decremented and D is stored into the memory location pointed to by SP. SP is decremented again and E is stored into the memory location pointed to by SP.

push de

SP is decremented and IXH is stored into the memory location pointed to by SP. SP is decremented again and IXL is stored into the memory location pointed to by SP.

push ix

SP is decremented and H is stored into the memory location pointed to by SP. SP is decremented again and L is stored into the memory location pointed to by SP.

push hl

SP is decremented and A is stored into the memory location pointed to by SP. SP is decremented again and F is stored into the memory location pointed to by SP.

push af

SP is decremented and IYH is stored into the memory location pointed to by SP. SP is decremented again and IYL is stored into the memory location pointed to by SP.

push iy

res res bit,r | res bit,(rr) | res bit,(ii+dd),r | res bit,(ii+dd)

Resets bit 0 of B.

res 0,b

Resets bit 0 of C.

res 0,c

Resets bit 0 of D.

res 0,d

Resets bit 0 of E.

res 0,e

Resets bit 0 of H.

res 0,h

Resets bit 0 of L.

res 0,l

Resets bit 0 of (HL).

res 0,(hl)

Resets bit 0 of A.

res 0,a

Resets bit 1 of B.

res 1,b

Resets bit 1 of C.

res 1,c

Resets bit 1 of D.

res 1,d

Resets bit 1 of E.

res 1,e

Resets bit 1 of H.

res 1,h

Resets bit 1 of L.

res 1,l

Resets bit 1 of (HL).

res 1,(hl)

Resets bit 1 of A.

res 1,a

Resets bit 2 of B.

res 2,b

Resets bit 2 of C.

res 2,c

Resets bit 2 of D.

res 2,d

Resets bit 2 of E.

res 2,e

Resets bit 2 of H.

res 2,h

Resets bit 2 of L.

res 2,l

Resets bit 2 of (HL).

res 2,(hl)

Resets bit 2 of A.

res 2,a

Resets bit 3 of B.

res 3,b

Resets bit 3 of C.

res 3,c

Resets bit 3 of D.

res 3,d

Resets bit 3 of E.

res 3,e

Resets bit 3 of H.

res 3,h

Resets bit 3 of L.

res 3,l

Resets bit 3 of (HL).

res 3,(hl)

Resets bit 3 of A.

res 3,a

Resets bit 4 of B.

res 4,b

Resets bit 4 of C.

res 4,c

Resets bit 4 of D.

res 4,d

Resets bit 4 of E.

res 4,e

Resets bit 4 of H.

res 4,h

Resets bit 4 of L.

res 4,l

Resets bit 4 of (HL).

res 4,(hl)

Resets bit 4 of A.

res 4,a

Resets bit 5 of B.

res 5,b

Resets bit 5 of C.

res 5,c

Resets bit 5 of D.

res 5,d

Resets bit 5 of E.

res 5,e

Resets bit 5 of H.

res 5,h

Resets bit 5 of L.

res 5,l

Resets bit 5 of (HL).

res 5,(hl)

Resets bit 5 of A.

res 5,a

Resets bit 6 of B.

res 6,b

Resets bit 6 of C.

res 6,c

Resets bit 6 of D.

res 6,d

Resets bit 6 of E.

res 6,e

Resets bit 6 of H.

res 6,h

Resets bit 6 of L.

res 6,l

Resets bit 6 of (HL).

res 6,(hl)

Resets bit 6 of A.

res 6,a

Resets bit 7 of B.

res 7,b

Resets bit 7 of C.

res 7,c

Resets bit 7 of D.

res 7,d

Resets bit 7 of E.

res 7,e

Resets bit 7 of H.

res 7,h

Resets bit 7 of L.

res 7,l

Resets bit 7 of (HL).

res 7,(hl)

Resets bit 7 of A.

res 7,a

Resets bit 0 of the memory location pointed to by IX plus dd. The result is then stored in B.

res 0,(ix+dd),b

Resets bit 0 of the memory location pointed to by IX plus dd. The result is then stored in C.

res 0,(ix+dd),c

Resets bit 0 of the memory location pointed to by IX plus dd. The result is then stored in D.

res 0,(ix+dd),d

Resets bit 0 of the memory location pointed to by IX plus dd. The result is then stored in E.

res 0,(ix+dd),e

Resets bit 0 of the memory location pointed to by IX plus dd. The result is then stored in H.

res 0,(ix+dd),h

Resets bit 0 of the memory location pointed to by IX plus dd. The result is then stored in L.

res 0,(ix+dd),l

Resets bit 0 of the memory location pointed to by IX plus dd.

res 0,(ix+dd)

Resets bit 0 of the memory location pointed to by IX plus dd. The result is then stored in A.

res 0,(ix+dd),a

Resets bit 1 of the memory location pointed to by IX plus dd. The result is then stored in B.

res 1,(ix+dd),b

Resets bit 1 of the memory location pointed to by IX plus dd. The result is then stored in C.

res 1,(ix+dd),c

Resets bit 1 of the memory location pointed to by IX plus dd. The result is then stored in D.

res 1,(ix+dd),d

Resets bit 1 of the memory location pointed to by IX plus dd. The result is then stored in E.

res 1,(ix+dd),e

Resets bit 1 of the memory location pointed to by IX plus dd. The result is then stored in H.

res 1,(ix+dd),h

Resets bit 1 of the memory location pointed to by IX plus dd. The result is then stored in L.

res 1,(ix+dd),l

Resets bit 1 of the memory location pointed to by IX plus dd.

res 1,(ix+dd)

Resets bit 1 of the memory location pointed to by IX plus dd. The result is then stored in A.

res 1,(ix+dd),a

Resets bit 2 of the memory location pointed to by IX plus dd. The result is then stored in B.

res 2,(ix+dd),b

Resets bit 2 of the memory location pointed to by IX plus dd. The result is then stored in C.

res 2,(ix+dd),c

Resets bit 2 of the memory location pointed to by IX plus dd. The result is then stored in D.

res 2,(ix+dd),d

Resets bit 2 of the memory location pointed to by IX plus dd. The result is then stored in E.

res 2,(ix+dd),e

Resets bit 2 of the memory location pointed to by IX plus dd. The result is then stored in H.

res 2,(ix+dd),h

Resets bit 2 of the memory location pointed to by IX plus dd. The result is then stored in L.

res 2,(ix+dd),l

Resets bit 2 of the memory location pointed to by IX plus dd.

res 2,(ix+dd)

Resets bit 2 of the memory location pointed to by IX plus dd. The result is then stored in A.

res 2,(ix+dd),a

Resets bit 3 of the memory location pointed to by IX plus dd. The result is then stored in B.

res 3,(ix+dd),b

Resets bit 3 of the memory location pointed to by IX plus dd. The result is then stored in C.

res 3,(ix+dd),c

Resets bit 3 of the memory location pointed to by IX plus dd. The result is then stored in D.

res 3,(ix+dd),d

Resets bit 3 of the memory location pointed to by IX plus dd. The result is then stored in E.

res 3,(ix+dd),e

Resets bit 3 of the memory location pointed to by IX plus dd. The result is then stored in H.

res 3,(ix+dd),h

Resets bit 3 of the memory location pointed to by IX plus dd. The result is then stored in L.

res 3,(ix+dd),l

Resets bit 3 of the memory location pointed to by IX plus dd.

res 3,(ix+dd)

Resets bit 3 of the memory location pointed to by IX plus dd. The result is then stored in A.

res 3,(ix+dd),a

Resets bit 4 of the memory location pointed to by IX plus dd. The result is then stored in B.

res 4,(ix+dd),b

Resets bit 4 of the memory location pointed to by IX plus dd. The result is then stored in C.

res 4,(ix+dd),c

Resets bit 4 of the memory location pointed to by IX plus dd. The result is then stored in D.

res 4,(ix+dd),d

Resets bit 4 of the memory location pointed to by IX plus dd. The result is then stored in E.

res 4,(ix+dd),e

Resets bit 4 of the memory location pointed to by IX plus dd. The result is then stored in H.

res 4,(ix+dd),h

Resets bit 4 of the memory location pointed to by IX plus dd. The result is then stored in L.

res 4,(ix+dd),l

Resets bit 4 of the memory location pointed to by IX plus dd.

res 4,(ix+dd)

Resets bit 4 of the memory location pointed to by IX plus dd. The result is then stored in A.

res 4,(ix+dd),a

Resets bit 5 of the memory location pointed to by IX plus dd. The result is then stored in B.

res 5,(ix+dd),b

Resets bit 5 of the memory location pointed to by IX plus dd. The result is then stored in C.

res 5,(ix+dd),c

Resets bit 5 of the memory location pointed to by IX plus dd. The result is then stored in D.

res 5,(ix+dd),d

Resets bit 5 of the memory location pointed to by IX plus dd. The result is then stored in E.

res 5,(ix+dd),e

Resets bit 5 of the memory location pointed to by IX plus dd. The result is then stored in H.

res 5,(ix+dd),h

Resets bit 5 of the memory location pointed to by IX plus dd. The result is then stored in L.

res 5,(ix+dd),l

Resets bit 5 of the memory location pointed to by IX plus dd.

res 5,(ix+dd)

Resets bit 5 of the memory location pointed to by IX plus dd. The result is then stored in A.

res 5,(ix+dd),a

Resets bit 6 of the memory location pointed to by IX plus dd. The result is then stored in B.

res 6,(ix+dd),b

Resets bit 6 of the memory location pointed to by IX plus dd. The result is then stored in C.

res 6,(ix+dd),c

Resets bit 6 of the memory location pointed to by IX plus dd. The result is then stored in D.

res 6,(ix+dd),d

Resets bit 6 of the memory location pointed to by IX plus dd. The result is then stored in E.

res 6,(ix+dd),e

Resets bit 6 of the memory location pointed to by IX plus dd. The result is then stored in H.

res 6,(ix+dd),h

Resets bit 6 of the memory location pointed to by IX plus dd. The result is then stored in L.

res 6,(ix+dd),l

Resets bit 6 of the memory location pointed to by IX plus dd.

res 6,(ix+dd)

Resets bit 6 of the memory location pointed to by IX plus dd. The result is then stored in A.

res 6,(ix+dd),a

Resets bit 7 of the memory location pointed to by IX plus dd. The result is then stored in B.

res 7,(ix+dd),b

Resets bit 7 of the memory location pointed to by IX plus dd. The result is then stored in C.

res 7,(ix+dd),c

Resets bit 7 of the memory location pointed to by IX plus dd. The result is then stored in D.

res 7,(ix+dd),d

Resets bit 7 of the memory location pointed to by IX plus dd. The result is then stored in E.

res 7,(ix+dd),e

Resets bit 7 of the memory location pointed to by IX plus dd. The result is then stored in H.

res 7,(ix+dd),h

Resets bit 7 of the memory location pointed to by IX plus dd. The result is then stored in L.

res 7,(ix+dd),l

Resets bit 7 of the memory location pointed to by IX plus dd.

res 7,(ix+dd)

Resets bit 7 of the memory location pointed to by IX plus dd. The result is then stored in A.

res 7,(ix+dd),a

Resets bit 0 of the memory location pointed to by IY plus dd. The result is then stored in B.

res 0,(iy+dd),b

Resets bit 0 of the memory location pointed to by IY plus dd. The result is then stored in C.

res 0,(iy+dd),c

Resets bit 0 of the memory location pointed to by IY plus dd. The result is then stored in D.

res 0,(iy+dd),d

Resets bit 0 of the memory location pointed to by IY plus dd. The result is then stored in E.

res 0,(iy+dd),e

Resets bit 0 of the memory location pointed to by IY plus dd. The result is then stored in H.

res 0,(iy+dd),h

Resets bit 0 of the memory location pointed to by IY plus dd. The result is then stored in L.

res 0,(iy+dd),l

Resets bit 0 of the memory location pointed to by IY plus dd.

res 0,(iy+dd)

Resets bit 0 of the memory location pointed to by IY plus dd. The result is then stored in A.

res 0,(iy+dd),a

Resets bit 1 of the memory location pointed to by IY plus dd. The result is then stored in B.

res 1,(iy+dd),b

Resets bit 1 of the memory location pointed to by IY plus dd. The result is then stored in C.

res 1,(iy+dd),c

Resets bit 1 of the memory location pointed to by IY plus dd. The result is then stored in D.

res 1,(iy+dd),d

Resets bit 1 of the memory location pointed to by IY plus dd. The result is then stored in E.

res 1,(iy+dd),e

Resets bit 1 of the memory location pointed to by IY plus dd. The result is then stored in H.

res 1,(iy+dd),h

Resets bit 1 of the memory location pointed to by IY plus dd. The result is then stored in L.

res 1,(iy+dd),l

Resets bit 1 of the memory location pointed to by IY plus dd.

res 1,(iy+dd)

Resets bit 1 of the memory location pointed to by IY plus dd. The result is then stored in A.

res 1,(iy+dd),a

Resets bit 2 of the memory location pointed to by IY plus dd. The result is then stored in B.

res 2,(iy+dd),b

Resets bit 2 of the memory location pointed to by IY plus dd. The result is then stored in C.

res 2,(iy+dd),c

Resets bit 2 of the memory location pointed to by IY plus dd. The result is then stored in D.

res 2,(iy+dd),d

Resets bit 2 of the memory location pointed to by IY plus dd. The result is then stored in E.

res 2,(iy+dd),e

Resets bit 2 of the memory location pointed to by IY plus dd. The result is then stored in H.

res 2,(iy+dd),h

Resets bit 2 of the memory location pointed to by IY plus dd. The result is then stored in L.

res 2,(iy+dd),l

Resets bit 2 of the memory location pointed to by IY plus dd.

res 2,(iy+dd)

Resets bit 2 of the memory location pointed to by IY plus dd. The result is then stored in A.

res 2,(iy+dd),a

Resets bit 3 of the memory location pointed to by IY plus dd. The result is then stored in B.

res 3,(iy+dd),b

Resets bit 3 of the memory location pointed to by IY plus dd. The result is then stored in C.

res 3,(iy+dd),c

Resets bit 3 of the memory location pointed to by IY plus dd. The result is then stored in D.

res 3,(iy+dd),d

Resets bit 3 of the memory location pointed to by IY plus dd. The result is then stored in E.

res 3,(iy+dd),e

Resets bit 3 of the memory location pointed to by IY plus dd. The result is then stored in H.

res 3,(iy+dd),h

Resets bit 3 of the memory location pointed to by IY plus dd. The result is then stored in L.

res 3,(iy+dd),l

Resets bit 3 of the memory location pointed to by IY plus dd.

res 3,(iy+dd)

Resets bit 3 of the memory location pointed to by IY plus dd. The result is then stored in A.

res 3,(iy+dd),a

Resets bit 4 of the memory location pointed to by IY plus dd. The result is then stored in B.

res 4,(iy+dd),b

Resets bit 4 of the memory location pointed to by IY plus dd. The result is then stored in C.

res 4,(iy+dd),c

Resets bit 4 of the memory location pointed to by IY plus dd. The result is then stored in D.

res 4,(iy+dd),d

Resets bit 4 of the memory location pointed to by IY plus dd. The result is then stored in E.

res 4,(iy+dd),e

Resets bit 4 of the memory location pointed to by IY plus dd. The result is then stored in H.

res 4,(iy+dd),h

Resets bit 4 of the memory location pointed to by IY plus dd. The result is then stored in L.

res 4,(iy+dd),l

Resets bit 4 of the memory location pointed to by IY plus dd.

res 4,(iy+dd)

Resets bit 4 of the memory location pointed to by IY plus dd. The result is then stored in A.

res 4,(iy+dd),a

Resets bit 5 of the memory location pointed to by IY plus dd. The result is then stored in B.

res 5,(iy+dd),b

Resets bit 5 of the memory location pointed to by IY plus dd. The result is then stored in C.

res 5,(iy+dd),c

Resets bit 5 of the memory location pointed to by IY plus dd. The result is then stored in D.

res 5,(iy+dd),d

Resets bit 5 of the memory location pointed to by IY plus dd. The result is then stored in E.

res 5,(iy+dd),e

Resets bit 5 of the memory location pointed to by IY plus dd. The result is then stored in H.

res 5,(iy+dd),h

Resets bit 5 of the memory location pointed to by IY plus dd. The result is then stored in L.

res 5,(iy+dd),l

Resets bit 5 of the memory location pointed to by IY plus dd.

res 5,(iy+dd)

Resets bit 5 of the memory location pointed to by IY plus dd. The result is then stored in A.

res 5,(iy+dd),a

Resets bit 6 of the memory location pointed to by IY plus dd. The result is then stored in B.

res 6,(iy+dd),b

Resets bit 6 of the memory location pointed to by IY plus dd. The result is then stored in C.

res 6,(iy+dd),c

Resets bit 6 of the memory location pointed to by IY plus dd. The result is then stored in D.

res 6,(iy+dd),d

Resets bit 6 of the memory location pointed to by IY plus dd. The result is then stored in E.

res 6,(iy+dd),e

Resets bit 6 of the memory location pointed to by IY plus dd. The result is then stored in H.

res 6,(iy+dd),h

Resets bit 6 of the memory location pointed to by IY plus dd. The result is then stored in L.

res 6,(iy+dd),l

Resets bit 6 of the memory location pointed to by IY plus dd.

res 6,(iy+dd)

Resets bit 6 of the memory location pointed to by IY plus dd. The result is then stored in A.

res 6,(iy+dd),a

Resets bit 7 of the memory location pointed to by IY plus dd. The result is then stored in B.

res 7,(iy+dd),b

Resets bit 7 of the memory location pointed to by IY plus dd. The result is then stored in C.

res 7,(iy+dd),c

Resets bit 7 of the memory location pointed to by IY plus dd. The result is then stored in D.

res 7,(iy+dd),d

Resets bit 7 of the memory location pointed to by IY plus dd. The result is then stored in E.

res 7,(iy+dd),e

Resets bit 7 of the memory location pointed to by IY plus dd. The result is then stored in H.

res 7,(iy+dd),h

Resets bit 7 of the memory location pointed to by IY plus dd. The result is then stored in L.

res 7,(iy+dd),l

Resets bit 7 of the memory location pointed to by IY plus dd.

res 7,(iy+dd)

Resets bit 7 of the memory location pointed to by IY plus dd. The result is then stored in A.

res 7,(iy+dd),a

ret ret cc | ret

If the zero flag is unset, the top stack entry is popped into PC.

ret nz

If the zero flag is set, the top stack entry is popped into PC.

ret z

The top stack entry is popped into PC.

ret

If the carry flag is unset, the top stack entry is popped into PC.

ret nc

If the carry flag is set, the top stack entry is popped into PC.

ret c

If the parity/overflow flag is unset, the top stack entry is popped into PC.

ret po

If the parity/overflow flag is set, the top stack entry is popped into PC.

ret pe

If the sign flag is unset, the top stack entry is popped into PC.

ret p

If the sign flag is set, the top stack entry is popped into PC.

ret m

reti reti

Used at the end of a maskable interrupt service routine. The top stack entry is popped into PC, and signals an I/O device that the interrupt has finished, allowing nested interrupts (not a consideration on the TI).

reti

retn retn

Used at the end of a non-maskable interrupt service routine (located at 0066h) to pop the top stack entry into PC. The value of IFF2 is copied to IFF1 so that maskable interrupts are allowed to continue as before. NMIs are not enabled on the TI.

retn

rl rl r | rl (rr) | rl (ii+dd),r | rl (ii+dd)

The contents of B are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.

rl b

The contents of C are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.

rl c

The contents of D are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.

rl d

The contents of E are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.

rl e

The contents of H are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.

rl h

The contents of L are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.

rl l

The contents of (HL) are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.

rl (hl)

The contents of A are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.

rl a

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0. The result is then stored in B.

rl (ix+dd),b

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0. The result is then stored in C.

rl (ix+dd),c

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0. The result is then stored in D.

rl (ix+dd),d

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0. The result is then stored in E.

rl (ix+dd),e

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0. The result is then stored in H.

rl (ix+dd),h

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0. The result is then stored in L.

rl (ix+dd),l

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.

rl (ix+dd)

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0. The result is then stored in A.

rl (ix+dd),a

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0. The result is then stored in B.

rl (iy+dd),b

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0. The result is then stored in C.

rl (iy+dd),c

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0. The result is then stored in D.

rl (iy+dd),d

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0. The result is then stored in E.

rl (iy+dd),e

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0. The result is then stored in H.

rl (iy+dd),h

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0. The result is then stored in L.

rl (iy+dd),l

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.

rl (iy+dd)

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0. The result is then stored in A.

rl (iy+dd),a

rla rla

The contents of A are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.

rla

rlc rlc r | rlc (rr) | rlc (ii+dd),r | rlc (ii+dd)

The contents of B are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.

rlc b

The contents of C are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.

rlc c

The contents of D are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.

rlc d

The contents of E are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.

rlc e

The contents of H are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.

rlc h

The contents of L are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.

rlc l

The contents of (HL) are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.

rlc (hl)

The contents of A are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.

rlc a

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0. The result is then stored in B.

rlc (ix+dd),b

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0. The result is then stored in C.

rlc (ix+dd),c

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0. The result is then stored in D.

rlc (ix+dd),d

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0. The result is then stored in E.

rlc (ix+dd),e

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0. The result is then stored in H.

rlc (ix+dd),h

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0. The result is then stored in L.

rlc (ix+dd),l

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.

rlc (ix+dd)

The contents of the memory location pointed to by IX plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0. The result is then stored in A.

rlc (ix+dd),a

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0. The result is then stored in B.

rlc (iy+dd),b

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0. The result is then stored in C.

rlc (iy+dd),c

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0. The result is then stored in D.

rlc (iy+dd),d

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0. The result is then stored in E.

rlc (iy+dd),e

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0. The result is then stored in H.

rlc (iy+dd),h

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0. The result is then stored in L.

rlc (iy+dd),l

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.

rlc (iy+dd)

The contents of the memory location pointed to by IY plus dd are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0. The result is then stored in A.

rlc (iy+dd),a

rlca rlca

The contents of A are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.

rlca

rld rld

The contents of the low-order nibble of (HL) are copied to the high-order nibble of (HL). The previous contents are copied to the low-order nibble of A. The previous contents are copied to the low-order nibble of (HL).

rld

rr rr r | rr (rr) | rr (ii+dd),r | rr (ii+dd)

The contents of B are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.

rr b

The contents of C are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.

rr c

The contents of D are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.

rr d

The contents of E are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.

rr e

The contents of H are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.

rr h

The contents of L are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.

rr l

The contents of (HL) are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.

rr (hl)

The contents of A are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.

rr a

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7. The result is then stored in B.

rr (ix+dd),b

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7. The result is then stored in C.

rr (ix+dd),c

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7. The result is then stored in D.

rr (ix+dd),d

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7. The result is then stored in E.

rr (ix+dd),e

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7. The result is then stored in H.

rr (ix+dd),h

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7. The result is then stored in L.

rr (ix+dd),l

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.

rr (ix+dd)

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7. The result is then stored in A.

rr (ix+dd),a

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7. The result is then stored in B.

rr (iy+dd),b

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7. The result is then stored in C.

rr (iy+dd),c

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7. The result is then stored in D.

rr (iy+dd),d

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7. The result is then stored in E.

rr (iy+dd),e

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7. The result is then stored in H.

rr (iy+dd),h

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7. The result is then stored in L.

rr (iy+dd),l

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.

rr (iy+dd)

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7. The result is then stored in A.

rr (iy+dd),a

rra rra

The contents of A are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.

rra

rrc rrc r | rrc (rr) | rrc (ii+dd),r | rrc (ii+dd)

The contents of B are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.

rrc b

The contents of C are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.

rrc c

The contents of D are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.

rrc d

The contents of E are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.

rrc e

The contents of H are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.

rrc h

The contents of L are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.

rrc l

The contents of (HL) are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.

rrc (hl)

The contents of A are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.

rrc a

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7. The result is then stored in B.

rrc (ix+dd),b

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7. The result is then stored in C.

rrc (ix+dd),c

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7. The result is then stored in D.

rrc (ix+dd),d

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7. The result is then stored in E.

rrc (ix+dd),e

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7. The result is then stored in H.

rrc (ix+dd),h

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7. The result is then stored in L.

rrc (ix+dd),l

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.

rrc (ix+dd)

The contents of the memory location pointed to by IX plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7. The result is then stored in A.

rrc (ix+dd),a

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7. The result is then stored in B.

rrc (iy+dd),b

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7. The result is then stored in C.

rrc (iy+dd),c

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7. The result is then stored in D.

rrc (iy+dd),d

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7. The result is then stored in E.

rrc (iy+dd),e

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7. The result is then stored in H.

rrc (iy+dd),h

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7. The result is then stored in L.

rrc (iy+dd),l

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.

rrc (iy+dd)

The contents of the memory location pointed to by IY plus dd are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7. The result is then stored in A.

rrc (iy+dd),a

rrca rrca

The contents of A are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.

rrca

rrd rrd

The contents of the low-order nibble of (HL) are copied to the low-order nibble of A. The previous contents are copied to the high-order nibble of (HL). The previous contents are copied to the low-order nibble of (HL).

rrd

rst rst 00 | rst 08 | rst 10 | rst 18 | rst 20 | rst 28 | rst 30 | rst 38

The current PC value plus one is pushed onto the stack, then is loaded with 0.

rst 00

The current PC value plus one is pushed onto the stack, then is loaded with 8.

rst 08

The current PC value plus one is pushed onto the stack, then is loaded with 16.

rst 10

The current PC value plus one is pushed onto the stack, then is loaded with 24.

rst 18

The current PC value plus one is pushed onto the stack, then is loaded with 32.

rst 20

The current PC value plus one is pushed onto the stack, then is loaded with 40.

rst 28

The current PC value plus one is pushed onto the stack, then is loaded with 48.

rst 30

The current PC value plus one is pushed onto the stack, then is loaded with 56.

rst 38

sbc sbc r,r' | sbc r | sbc r,(rr) | sbc (rr) | sbc r,(ii+dd) | sbc (ii+dd) | sbc r,nn | sbc nn | sbc rr,rr'

Subtracts B and the carry flag from A.

sbc a,b

Subtracts C and the carry flag from A.

sbc a,c

Subtracts D and the carry flag from A.

sbc a,d

Subtracts E and the carry flag from A.

sbc a,e

Subtracts H and the carry flag from A.

sbc a,h

Subtracts L and the carry flag from A.

sbc a,l

Subtracts (HL) and the carry flag from A.

sbc a,(hl)

Subtracts A and the carry flag from A.

sbc a,a

Subtracts IXH and the carry flag from A.

sbc a,ixh

Subtracts IXL and the carry flag from A.

sbc a,ixl

Subtracts the value pointed to by IX plus dd and the carry flag from A.

sbc a,(ix+dd)

Subtracts nn and the carry flag from A.

sbc a,nn

Subtracts BC and the carry flag from HL.

sbc hl,bc

Subtracts DE and the carry flag from HL.

sbc hl,de

Subtracts HL and the carry flag from HL.

sbc hl,hl

Subtracts SP and the carry flag from HL.

sbc hl,sp

Subtracts IYH and the carry flag from A.

sbc a,iyh

Subtracts IYL and the carry flag from A.

sbc a,iyl

Subtracts the value pointed to by IY plus dd and the carry flag from A.

sbc a,(iy+dd)

scf scf

Sets the carry flag.

scf

set set bit,r | set bit,(rr) | set bit,(ii+dd),r | set bit,(ii+dd)

Sets bit 0 of B.

set 0,b

Sets bit 0 of C.

set 0,c

Sets bit 0 of D.

set 0,d

Sets bit 0 of E.

set 0,e

Sets bit 0 of H.

set 0,h

Sets bit 0 of L.

set 0,l

Sets bit 0 of (HL).

set 0,(hl)

Sets bit 0 of A.

set 0,a

Sets bit 1 of B.

set 1,b

Sets bit 1 of C.

set 1,c

Sets bit 1 of D.

set 1,d

Sets bit 1 of E.

set 1,e

Sets bit 1 of H.

set 1,h

Sets bit 1 of L.

set 1,l

Sets bit 1 of (HL).

set 1,(hl)

Sets bit 1 of A.

set 1,a

Sets bit 2 of B.

set 2,b

Sets bit 2 of C.

set 2,c

Sets bit 2 of D.

set 2,d

Sets bit 2 of E.

set 2,e

Sets bit 2 of H.

set 2,h

Sets bit 2 of L.

set 2,l

Sets bit 2 of (HL).

set 2,(hl)

Sets bit 2 of A.

set 2,a

Sets bit 3 of B.

set 3,b

Sets bit 3 of C.

set 3,c

Sets bit 3 of D.

set 3,d

Sets bit 3 of E.

set 3,e

Sets bit 3 of H.

set 3,h

Sets bit 3 of L.

set 3,l

Sets bit 3 of (HL).

set 3,(hl)

Sets bit 3 of A.

set 3,a

Sets bit 4 of B.

set 4,b

Sets bit 4 of C.

set 4,c

Sets bit 4 of D.

set 4,d

Sets bit 4 of E.

set 4,e

Sets bit 4 of H.

set 4,h

Sets bit 4 of L.

set 4,l

Sets bit 4 of (HL).

set 4,(hl)

Sets bit 4 of A.

set 4,a

Sets bit 5 of B.

set 5,b

Sets bit 5 of C.

set 5,c

Sets bit 5 of D.

set 5,d

Sets bit 5 of E.

set 5,e

Sets bit 5 of H.

set 5,h

Sets bit 5 of L.

set 5,l

Sets bit 5 of (HL).

set 5,(hl)

Sets bit 5 of A.

set 5,a

Sets bit 6 of B.

set 6,b

Sets bit 6 of C.

set 6,c

Sets bit 6 of D.

set 6,d

Sets bit 6 of E.

set 6,e

Sets bit 6 of H.

set 6,h

Sets bit 6 of L.

set 6,l

Sets bit 6 of (HL).

set 6,(hl)

Sets bit 6 of A.

set 6,a

Sets bit 7 of B.

set 7,b

Sets bit 7 of C.

set 7,c

Sets bit 7 of D.

set 7,d

Sets bit 7 of E.

set 7,e

Sets bit 7 of H.

set 7,h

Sets bit 7 of L.

set 7,l

Sets bit 7 of (HL).

set 7,(hl)

Sets bit 7 of A.

set 7,a

Sets bit 0 of the memory location pointed to by IX plus dd. The result is then stored in B.

set 0,(ix+dd),b

Sets bit 0 of the memory location pointed to by IX plus dd. The result is then stored in C.

set 0,(ix+dd),c

Sets bit 0 of the memory location pointed to by IX plus dd. The result is then stored in D.

set 0,(ix+dd),d

Sets bit 0 of the memory location pointed to by IX plus dd. The result is then stored in E.

set 0,(ix+dd),e

Sets bit 0 of the memory location pointed to by IX plus dd. The result is then stored in H.

set 0,(ix+dd),h

Sets bit 0 of the memory location pointed to by IX plus dd. The result is then stored in L.

set 0,(ix+dd),l

Sets bit 0 of the memory location pointed to by IX plus dd.

set 0,(ix+dd)

Sets bit 0 of the memory location pointed to by IX plus dd. The result is then stored in A.

set 0,(ix+dd),a

Sets bit 1 of the memory location pointed to by IX plus dd. The result is then stored in B.

set 1,(ix+dd),b

Sets bit 1 of the memory location pointed to by IX plus dd. The result is then stored in C.

set 1,(ix+dd),c

Sets bit 1 of the memory location pointed to by IX plus dd. The result is then stored in D.

set 1,(ix+dd),d

Sets bit 1 of the memory location pointed to by IX plus dd. The result is then stored in E.

set 1,(ix+dd),e

Sets bit 1 of the memory location pointed to by IX plus dd. The result is then stored in H.

set 1,(ix+dd),h

Sets bit 1 of the memory location pointed to by IX plus dd. The result is then stored in L.

set 1,(ix+dd),l

Sets bit 1 of the memory location pointed to by IX plus dd.

set 1,(ix+dd)

Sets bit 1 of the memory location pointed to by IX plus dd. The result is then stored in A.

set 1,(ix+dd),a

Sets bit 2 of the memory location pointed to by IX plus dd. The result is then stored in B.

set 2,(ix+dd),b

Sets bit 2 of the memory location pointed to by IX plus dd. The result is then stored in C.

set 2,(ix+dd),c

Sets bit 2 of the memory location pointed to by IX plus dd. The result is then stored in D.

set 2,(ix+dd),d

Sets bit 2 of the memory location pointed to by IX plus dd. The result is then stored in E.

set 2,(ix+dd),e

Sets bit 2 of the memory location pointed to by IX plus dd. The result is then stored in H.

set 2,(ix+dd),h

Sets bit 2 of the memory location pointed to by IX plus dd. The result is then stored in L.

set 2,(ix+dd),l

Sets bit 2 of the memory location pointed to by IX plus dd.

set 2,(ix+dd)

Sets bit 2 of the memory location pointed to by IX plus dd. The result is then stored in A.

set 2,(ix+dd),a

Sets bit 3 of the memory location pointed to by IX plus dd. The result is then stored in B.

set 3,(ix+dd),b

Sets bit 3 of the memory location pointed to by IX plus dd. The result is then stored in C.

set 3,(ix+dd),c

Sets bit 3 of the memory location pointed to by IX plus dd. The result is then stored in D.

set 3,(ix+dd),d

Sets bit 3 of the memory location pointed to by IX plus dd. The result is then stored in E.

set 3,(ix+dd),e

Sets bit 3 of the memory location pointed to by IX plus dd. The result is then stored in H.

set 3,(ix+dd),h

Sets bit 3 of the memory location pointed to by IX plus dd. The result is then stored in L.

set 3,(ix+dd),l

Sets bit 3 of the memory location pointed to by IX plus dd.

set 3,(ix+dd)

Sets bit 3 of the memory location pointed to by IX plus dd. The result is then stored in A.

set 3,(ix+dd),a

Sets bit 4 of the memory location pointed to by IX plus dd. The result is then stored in B.

set 4,(ix+dd),b

Sets bit 4 of the memory location pointed to by IX plus dd. The result is then stored in C.

set 4,(ix+dd),c

Sets bit 4 of the memory location pointed to by IX plus dd. The result is then stored in D.

set 4,(ix+dd),d

Sets bit 4 of the memory location pointed to by IX plus dd. The result is then stored in E.

set 4,(ix+dd),e

Sets bit 4 of the memory location pointed to by IX plus dd. The result is then stored in H.

set 4,(ix+dd),h

Sets bit 4 of the memory location pointed to by IX plus dd. The result is then stored in L.

set 4,(ix+dd),l

Sets bit 4 of the memory location pointed to by IX plus dd.

set 4,(ix+dd)

Sets bit 4 of the memory location pointed to by IX plus dd. The result is then stored in A.

set 4,(ix+dd),a

Sets bit 5 of the memory location pointed to by IX plus dd. The result is then stored in B.

set 5,(ix+dd),b

Sets bit 5 of the memory location pointed to by IX plus dd. The result is then stored in C.

set 5,(ix+dd),c

Sets bit 5 of the memory location pointed to by IX plus dd. The result is then stored in D.

set 5,(ix+dd),d

Sets bit 5 of the memory location pointed to by IX plus dd. The result is then stored in E.

set 5,(ix+dd),e

Sets bit 5 of the memory location pointed to by IX plus dd. The result is then stored in H.

set 5,(ix+dd),h

Sets bit 5 of the memory location pointed to by IX plus dd. The result is then stored in L.

set 5,(ix+dd),l

Sets bit 5 of the memory location pointed to by IX plus dd.

set 5,(ix+dd)

Sets bit 5 of the memory location pointed to by IX plus dd. The result is then stored in A.

set 5,(ix+dd),a

Sets bit 6 of the memory location pointed to by IX plus dd. The result is then stored in B.

set 6,(ix+dd),b

Sets bit 6 of the memory location pointed to by IX plus dd. The result is then stored in C.

set 6,(ix+dd),c

Sets bit 6 of the memory location pointed to by IX plus dd. The result is then stored in D.

set 6,(ix+dd),d

Sets bit 6 of the memory location pointed to by IX plus dd. The result is then stored in E.

set 6,(ix+dd),e

Sets bit 6 of the memory location pointed to by IX plus dd. The result is then stored in H.

set 6,(ix+dd),h

Sets bit 6 of the memory location pointed to by IX plus dd. The result is then stored in L.

set 6,(ix+dd),l

Sets bit 6 of the memory location pointed to by IX plus dd.

set 6,(ix+dd)

Sets bit 6 of the memory location pointed to by IX plus dd. The result is then stored in A.

set 6,(ix+dd),a

Sets bit 7 of the memory location pointed to by IX plus dd. The result is then stored in B.

set 7,(ix+dd),b

Sets bit 7 of the memory location pointed to by IX plus dd. The result is then stored in C.

set 7,(ix+dd),c

Sets bit 7 of the memory location pointed to by IX plus dd. The result is then stored in D.

set 7,(ix+dd),d

Sets bit 7 of the memory location pointed to by IX plus dd. The result is then stored in E.

set 7,(ix+dd),e

Sets bit 7 of the memory location pointed to by IX plus dd. The result is then stored in H.

set 7,(ix+dd),h

Sets bit 7 of the memory location pointed to by IX plus dd. The result is then stored in L.

set 7,(ix+dd),l

Sets bit 7 of the memory location pointed to by IX plus dd.

set 7,(ix+dd)

Sets bit 7 of the memory location pointed to by IX plus dd. The result is then stored in A.

set 7,(ix+dd),a

Sets bit 0 of the memory location pointed to by IY plus dd. The result is then stored in B.

set 0,(iy+dd),b

Sets bit 0 of the memory location pointed to by IY plus dd. The result is then stored in C.

set 0,(iy+dd),c

Sets bit 0 of the memory location pointed to by IY plus dd. The result is then stored in D.

set 0,(iy+dd),d

Sets bit 0 of the memory location pointed to by IY plus dd. The result is then stored in E.

set 0,(iy+dd),e

Sets bit 0 of the memory location pointed to by IY plus dd. The result is then stored in H.

set 0,(iy+dd),h

Sets bit 0 of the memory location pointed to by IY plus dd. The result is then stored in L.

set 0,(iy+dd),l

Sets bit 0 of the memory location pointed to by IY plus dd.

set 0,(iy+dd)

Sets bit 0 of the memory location pointed to by IY plus dd. The result is then stored in A.

set 0,(iy+dd),a

Sets bit 1 of the memory location pointed to by IY plus dd. The result is then stored in B.

set 1,(iy+dd),b

Sets bit 1 of the memory location pointed to by IY plus dd. The result is then stored in C.

set 1,(iy+dd),c

Sets bit 1 of the memory location pointed to by IY plus dd. The result is then stored in D.

set 1,(iy+dd),d

Sets bit 1 of the memory location pointed to by IY plus dd. The result is then stored in E.

set 1,(iy+dd),e

Sets bit 1 of the memory location pointed to by IY plus dd. The result is then stored in H.

set 1,(iy+dd),h

Sets bit 1 of the memory location pointed to by IY plus dd. The result is then stored in L.

set 1,(iy+dd),l

Sets bit 1 of the memory location pointed to by IY plus dd.

set 1,(iy+dd)

Sets bit 1 of the memory location pointed to by IY plus dd. The result is then stored in A.

set 1,(iy+dd),a

Sets bit 2 of the memory location pointed to by IY plus dd. The result is then stored in B.

set 2,(iy+dd),b

Sets bit 2 of the memory location pointed to by IY plus dd. The result is then stored in C.

set 2,(iy+dd),c

Sets bit 2 of the memory location pointed to by IY plus dd. The result is then stored in D.

set 2,(iy+dd),d

Sets bit 2 of the memory location pointed to by IY plus dd. The result is then stored in E.

set 2,(iy+dd),e

Sets bit 2 of the memory location pointed to by IY plus dd. The result is then stored in H.

set 2,(iy+dd),h

Sets bit 2 of the memory location pointed to by IY plus dd. The result is then stored in L.

set 2,(iy+dd),l

Sets bit 2 of the memory location pointed to by IY plus dd.

set 2,(iy+dd)

Sets bit 2 of the memory location pointed to by IY plus dd. The result is then stored in A.

set 2,(iy+dd),a

Sets bit 3 of the memory location pointed to by IY plus dd. The result is then stored in B.

set 3,(iy+dd),b

Sets bit 3 of the memory location pointed to by IY plus dd. The result is then stored in C.

set 3,(iy+dd),c

Sets bit 3 of the memory location pointed to by IY plus dd. The result is then stored in D.

set 3,(iy+dd),d

Sets bit 3 of the memory location pointed to by IY plus dd. The result is then stored in E.

set 3,(iy+dd),e

Sets bit 3 of the memory location pointed to by IY plus dd. The result is then stored in H.

set 3,(iy+dd),h

Sets bit 3 of the memory location pointed to by IY plus dd. The result is then stored in L.

set 3,(iy+dd),l

Sets bit 3 of the memory location pointed to by IY plus dd.

set 3,(iy+dd)

Sets bit 3 of the memory location pointed to by IY plus dd. The result is then stored in A.

set 3,(iy+dd),a

Sets bit 4 of the memory location pointed to by IY plus dd. The result is then stored in B.

set 4,(iy+dd),b

Sets bit 4 of the memory location pointed to by IY plus dd. The result is then stored in C.

set 4,(iy+dd),c

Sets bit 4 of the memory location pointed to by IY plus dd. The result is then stored in D.

set 4,(iy+dd),d

Sets bit 4 of the memory location pointed to by IY plus dd. The result is then stored in E.

set 4,(iy+dd),e

Sets bit 4 of the memory location pointed to by IY plus dd. The result is then stored in H.

set 4,(iy+dd),h

Sets bit 4 of the memory location pointed to by IY plus dd. The result is then stored in L.

set 4,(iy+dd),l

Sets bit 4 of the memory location pointed to by IY plus dd.

set 4,(iy+dd)

Sets bit 4 of the memory location pointed to by IY plus dd. The result is then stored in A.

set 4,(iy+dd),a

Sets bit 5 of the memory location pointed to by IY plus dd. The result is then stored in B.

set 5,(iy+dd),b

Sets bit 5 of the memory location pointed to by IY plus dd. The result is then stored in C.

set 5,(iy+dd),c

Sets bit 5 of the memory location pointed to by IY plus dd. The result is then stored in D.

set 5,(iy+dd),d

Sets bit 5 of the memory location pointed to by IY plus dd. The result is then stored in E.

set 5,(iy+dd),e

Sets bit 5 of the memory location pointed to by IY plus dd. The result is then stored in H.

set 5,(iy+dd),h

Sets bit 5 of the memory location pointed to by IY plus dd. The result is then stored in L.

set 5,(iy+dd),l

Sets bit 5 of the memory location pointed to by IY plus dd.

set 5,(iy+dd)

Sets bit 5 of the memory location pointed to by IY plus dd. The result is then stored in A.

set 5,(iy+dd),a

Sets bit 6 of the memory location pointed to by IY plus dd. The result is then stored in B.

set 6,(iy+dd),b

Sets bit 6 of the memory location pointed to by IY plus dd. The result is then stored in C.

set 6,(iy+dd),c

Sets bit 6 of the memory location pointed to by IY plus dd. The result is then stored in D.

set 6,(iy+dd),d

Sets bit 6 of the memory location pointed to by IY plus dd. The result is then stored in E.

set 6,(iy+dd),e

Sets bit 6 of the memory location pointed to by IY plus dd. The result is then stored in H.

set 6,(iy+dd),h

Sets bit 6 of the memory location pointed to by IY plus dd. The result is then stored in L.

set 6,(iy+dd),l

Sets bit 6 of the memory location pointed to by IY plus dd.

set 6,(iy+dd)

Sets bit 6 of the memory location pointed to by IY plus dd. The result is then stored in A.

set 6,(iy+dd),a

Sets bit 7 of the memory location pointed to by IY plus dd. The result is then stored in B.

set 7,(iy+dd),b

Sets bit 7 of the memory location pointed to by IY plus dd. The result is then stored in C.

set 7,(iy+dd),c

Sets bit 7 of the memory location pointed to by IY plus dd. The result is then stored in D.

set 7,(iy+dd),d

Sets bit 7 of the memory location pointed to by IY plus dd. The result is then stored in E.

set 7,(iy+dd),e

Sets bit 7 of the memory location pointed to by IY plus dd. The result is then stored in H.

set 7,(iy+dd),h

Sets bit 7 of the memory location pointed to by IY plus dd. The result is then stored in L.

set 7,(iy+dd),l

Sets bit 7 of the memory location pointed to by IY plus dd.

set 7,(iy+dd)

Sets bit 7 of the memory location pointed to by IY plus dd. The result is then stored in A.

set 7,(iy+dd),a

sla sla r | sla (rr) | sla (ii+dd),r | sla (ii+dd)

The contents of B are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.

sla b

The contents of C are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.

sla c

The contents of D are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.

sla d

The contents of E are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.

sla e

The contents of H are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.

sla h

The contents of L are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.

sla l

The contents of (HL) are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.

sla (hl)

The contents of A are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.

sla a

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0. The result is then stored in B.

sla (ix+dd),b

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0. The result is then stored in C.

sla (ix+dd),c

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0. The result is then stored in D.

sla (ix+dd),d

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0. The result is then stored in E.

sla (ix+dd),e

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0. The result is then stored in H.

sla (ix+dd),h

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0. The result is then stored in L.

sla (ix+dd),l

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.

sla (ix+dd)

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0. The result is then stored in A.

sla (ix+dd),a

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0. The result is then stored in B.

sla (iy+dd),b

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0. The result is then stored in C.

sla (iy+dd),c

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0. The result is then stored in D.

sla (iy+dd),d

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0. The result is then stored in E.

sla (iy+dd),e

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0. The result is then stored in H.

sla (iy+dd),h

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0. The result is then stored in L.

sla (iy+dd),l

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.

sla (iy+dd)

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0. The result is then stored in A.

sla (iy+dd),a

sll sll r | sll (rr) | sll (ii+dd),r | sll (ii+dd)

The contents of B are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0.

sll b

The contents of C are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0.

sll c

The contents of D are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0.

sll d

The contents of E are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0.

sll e

The contents of H are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0.

sll h

The contents of L are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0.

sll l

The contents of (HL) are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0.

sll (hl)

The contents of A are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0.

sll a

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. The result is then stored in B.

sll (ix+dd),b

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. The result is then stored in C.

sll (ix+dd),c

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. The result is then stored in D.

sll (ix+dd),d

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. The result is then stored in E.

sll (ix+dd),e

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. The result is then stored in H.

sll (ix+dd),h

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. The result is then stored in L.

sll (ix+dd),l

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0.

sll (ix+dd)

The contents of the memory location pointed to by IX plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. The result is then stored in A.

sll (ix+dd),a

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. The result is then stored in B.

sll (iy+dd),b

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. The result is then stored in C.

sll (iy+dd),c

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. The result is then stored in D.

sll (iy+dd),d

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. The result is then stored in E.

sll (iy+dd),e

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. The result is then stored in H.

sll (iy+dd),h

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. The result is then stored in L.

sll (iy+dd),l

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0.

sll (iy+dd)

The contents of the memory location pointed to by IY plus dd are shifted left one bit position. The contents of bit 7 are put into the carry flag and a one is put into bit 0. The result is then stored in A.

sll (iy+dd),a

sra sra r | sra (rr) | sra (ii+dd),r | sra (ii+dd)

The contents of B are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.

sra b

The contents of C are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.

sra c

The contents of D are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.

sra d

The contents of E are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.

sra e

The contents of H are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.

sra h

The contents of L are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.

sra l

The contents of (HL) are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.

sra (hl)

The contents of A are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.

sra a

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored in B.

sra (ix+dd),b

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored in C.

sra (ix+dd),c

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored in D.

sra (ix+dd),d

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored in E.

sra (ix+dd),e

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored in H.

sra (ix+dd),h

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored in L.

sra (ix+dd),l

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.

sra (ix+dd)

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored in A.

sra (ix+dd),a

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored in B.

sra (iy+dd),b

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored in C.

sra (iy+dd),c

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored in D.

sra (iy+dd),d

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored in E.

sra (iy+dd),e

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored in H.

sra (iy+dd),h

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored in L.

sra (iy+dd),l

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.

sra (iy+dd)

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored in A.

sra (iy+dd),a

srl srl r | srl (rr) | srl (ii+dd),r | srl (ii+dd)

The contents of B are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.

srl b

The contents of C are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.

srl c

The contents of D are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.

srl d

The contents of E are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.

srl e

The contents of H are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.

srl h

The contents of L are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.

srl l

The contents of (HL) are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.

srl (hl)

The contents of A are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.

srl a

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7. The result is then stored in B.

srl (ix+dd),b

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7. The result is then stored in C.

srl (ix+dd),c

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7. The result is then stored in D.

srl (ix+dd),d

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7. The result is then stored in E.

srl (ix+dd),e

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7. The result is then stored in H.

srl (ix+dd),h

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7. The result is then stored in L.

srl (ix+dd),l

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.

srl (ix+dd)

The contents of the memory location pointed to by IX plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7. The result is then stored in A.

srl (ix+dd),a

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7. The result is then stored in B.

srl (iy+dd),b

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7. The result is then stored in C.

srl (iy+dd),c

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7. The result is then stored in D.

srl (iy+dd),d

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7. The result is then stored in E.

srl (iy+dd),e

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7. The result is then stored in H.

srl (iy+dd),h

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7. The result is then stored in L.

srl (iy+dd),l

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.

srl (iy+dd)

The contents of the memory location pointed to by IY plus dd are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7. The result is then stored in A.

srl (iy+dd),a

sub sub r | sub r,r' | sub (rr) | sub r,(rr) | sub nn | sub r,nn | sub (ii+dd) | sub r,(ii+dd)

Subtracts B from A.

sub b

Subtracts C from A.

sub c

Subtracts D from A.

sub d

Subtracts E from A.

sub e

Subtracts H from A.

sub h

Subtracts L from A.

sub l

Subtracts (HL) from A.

sub (hl)

Subtracts A from A.

sub a

Subtracts nn from A.

sub nn

Subtracts IXH from A.

sub ixh

Subtracts IXL from A.

sub ixl

Subtracts the value pointed to by IX plus dd from A.

sub (ix+dd)

Subtracts IYH from A.

sub iyh

Subtracts IYL from A.

sub iyl

Subtracts the value pointed to by IY plus dd from A.

sub (iy+dd)

xor xor r | xor r,r' | xor (rr) | xor r,(rr) | xor (ii+dd) | xor r,(ii+dd) | xor nn | xor r,nn

Bitwise XOR on A with B.

xor b

Bitwise XOR on A with C.

xor c

Bitwise XOR on A with D.

xor d

Bitwise XOR on A with E.

xor e

Bitwise XOR on A with H.

xor h

Bitwise XOR on A with L.

xor l

Bitwise XOR on A with (HL).

xor (hl)

Bitwise XOR on A with A.

xor a

Bitwise XOR on A with IXH.

xor ixh

Bitwise XOR on A with IXL.

xor ixl

Bitwise XOR on A with the value pointed to by IX plus dd.

xor (ix+dd)

Bitwise XOR on A with nn.

xor nn

Bitwise XOR on A with IYH.

xor iyh

Bitwise XOR on A with IYL.

xor iyl

Bitwise XOR on A with the value pointed to by IY plus dd.

xor (iy+dd)

Directives

Directives are not executed by the CPU: they tell the assembler where to put the code, what data to emit, which names stand for which values, and when to expand a macro.

.title

Set the title of the program, as a string.

error

Force an error.

defb

Define a sequence of bytes, text, or strings.

Also written as db.db.bytedefmdm.dm.text.ascii.asciz

defw

Define a sequence of 16-bit words.

Also written as dw.dw.word

.long

Define a sequence of 32-bit longs.

equ

Assign a value to a symbol.

Also written as .equdefl=

org

Specify address of next instruction.

Also written as .org.loc

align

Add fill bytes until address is multiple of specified value.

Also written as .align

defs

Fill memory with repeated bytes.

Also written as ds.ds.block.blkbdatadc

macro

Start a macro definition.

Also written as .macro

endm

End a macro definition.

Also written as .endm

if

If conditional.

Also written as cond

else

Else conditional.

endif

End of if conditional.

Also written as endc

end

End of file, optionally followed by entry address or label.

#target

Specify whether targeting bin or rom.

#code

Start a new code segment.

#include

Include an assembly file or library directory.

#local

Start a local scope.

#endlocal

End a local scope.

#insert

Insert a binary file.

Registers & Flags

Registers

a 8 bit

Accumulator. The destination of every 8 bit arithmetic and logic instruction, and the only register that can be loaded from or stored to a bare address.

f 8 bit

Flags. Holds the sign, zero, half carry, parity/overflow, add/subtract and carry bits; it is read and written only as part of af (push af, pop af, ex af,af').

b 8 bit

General purpose register, and the counter used by djnz, the block instructions (ldir, cpir, …) and the (c) port instructions.

c 8 bit

General purpose register, and the port number used by in r,(c) and out (c),r.

d 8 bit

General purpose register, the high half of de.

e 8 bit

General purpose register, the low half of de.

h 8 bit

General purpose register, the high half of hl.

l 8 bit

General purpose register, the low half of hl.

af 16 bit

The accumulator and the flags as one 16 bit register. Only push, pop and ex af,af' use it as a pair.

bc 16 bit

The b and c registers as a pair. Used as a byte counter by the block instructions and as the port address by the (c) forms.

de 16 bit

The d and e registers as a pair. The destination pointer of the block copy instructions.

hl 16 bit

The h and l registers as a pair. The Z80's main pointer: (hl) can stand in for any 8 bit register operand, and add hl,rr is the only 16 bit addition.

ix 16 bit

Index register. Addressed as (ix+dd) with a signed 8 bit displacement, which costs an extra prefix byte and several clock cycles per access.

iy 16 bit

Index register, identical to ix but with its own prefix.

sp 16 bit

Stack pointer. push decrements it by two before writing, so the stack grows downwards; it starts at the top of memory.

pc 16 bit

Program counter: the address of the next instruction to execute.

af' 16 bit

The alternate accumulator and flags, swapped in by ex af,af'. Traditionally reserved for interrupt handlers.

bc' 16 bit

The alternate bc, swapped in by exx together with de' and hl'.

de' 16 bit

The alternate de, swapped in by exx.

hl' 16 bit

The alternate hl, swapped in by exx.

i 8 bit

Interrupt vector register: the high byte of the vector table address in interrupt mode 2. Nothing raises interrupts in this emulator.

r 8 bit

Memory refresh register. The low 7 bits increment on every instruction fetch, which is why it is sometimes used as a cheap random number.

ixh 8 bit undocumented

The high half of ix.

ixl 8 bit undocumented

The low half of ix.

iyh 8 bit undocumented

The high half of iy.

iyl 8 bit undocumented

The low half of iy.

Flags

The flags live in the F register, which is only reachable as the high half of af. Every arithmetic and logic instruction updates some of them; the instruction pages list which.

S bit 7

Sign: set when the result is negative (bit 7 of the result).

Z bit 6

Zero: set when the result is zero.

H bit 4

Half carry: carry from bit 3 to bit 4, used by daa for BCD arithmetic.

P/V bit 2

Parity/overflow: parity of the result for logical and rotate instructions (set when even), signed overflow for arithmetic instructions.

N bit 1

Add/subtract: set when the last operation was a subtraction, used by daa.

C bit 0

Carry: carry out of bit 7 (or 15), borrow for subtractions, and the bit shifted out by rotates and shifts.

Condition codes

Written after jp, call and ret to run them only when the flags say so, as in jp nz, loop. jr understands only the first four.

nz

Not zero: the Z flag is reset.

z

Zero: the Z flag is set.

nc

No carry: the C flag is reset.

c

Carry: the C flag is set. Not to be confused with the c register.

po

Parity odd / no overflow: the P/V flag is reset.

pe

Parity even / overflow: the P/V flag is set.

p

Plus: the S flag is reset, i.e. the result was not negative.

m

Minus: the S flag is set, i.e. the result was negative.

nv

No overflow: a synonym of po, kept for other assemblers.

v

Overflow: a synonym of pe, kept for other assemblers.

Operand placeholders

The instruction tables write operands with these placeholders: ld (ix+dd), nn is written in a program as ld (ix+2), 42.

nn

8 bit value: a number from 0 to 255 (or -128 to 127), a character constant, or a symbol.

nnnn

16 bit value or address, from 0 to 65535. Labels are 16 bit values.

dd

Signed 8 bit displacement, -128 to 127, added to ix or iy to form the address.

offset

Target of a relative jump. Write a label or an address: the assembler computes the -128 to 127 displacement and reports an error when the target is out of reach.

(hl)

The byte in memory at the address in hl. Usable wherever an 8 bit register is, at the cost of one extra memory access.

(ix+dd)

The byte in memory at ix plus the signed displacement, e.g. ld a,(ix+2). iy works the same way.

cc

A condition code, tested against the flags by jp, call, ret and (for the first four only) jr.

Input/Output

A Z80 has no system calls. Programs reach the outside world with in and out, which address one of 256 ports: out (n), a sends A to port n, in a, (n) reads a byte back. The (c) forms (out (c), r and in r, (c)) take the port number from C, which lets a program compute it.

The emulator connects the five ports below to the console. Every other port behaves like an empty bus: writes are dropped and reads answer 0xFF. Reading a connected port with nothing to read pauses the program until a line has been typed, so in never fails, it only waits.

0x00 Character

out

Prints the byte as a character (Latin-1). 0x0A prints a newline.

in

Returns the next character of the input line, pausing for input when the line has been consumed. The line ends with a newline character (0x0A).

        .org 0x8000
        ld hl, msg
loop:   ld a, (hl)
        or a
        jr z, done
        out (0), a
        inc hl
        jr loop
done:   halt
msg:    .asciz "Hello!", 10   ; 10 is the newline: strings keep \n literally
prints Hello!

0x01 Unsigned number

out

Prints the byte as an unsigned decimal number, 0 to 255.

in

Reads a line, parses it as a decimal number and returns its low byte. Stops the program with an error when the line is not a number.

        .org 0x8000
        in a, (1)       ; ask for a number
        add a, a        ; double it
        out (1), a      ; print it
        halt
prints 42 (when 21 is entered)

0x02 Signed number

out

Prints the byte as a signed decimal number, -128 to 127.

in

Same as the unsigned number port.

        .org 0x8000
        ld a, 5
        sub 10
        out (2), a
        halt
prints -5

0x03 Hexadecimal

out

Prints the byte as two upper case hexadecimal digits.

in

Reads a line, parses it as a hexadecimal number (0x, $ prefix or h suffix accepted) and returns its low byte.

        .org 0x8000
        ld a, 255
        out (3), a
        halt
prints FF

0x04 16 bit number

out

Prints the 16 bit number made of the high byte of the port address (register B when using out (c),r) and the byte written, as an unsigned decimal number.

in

Same as the unsigned number port.

        .org 0x8000
        ld hl, 1000
        ld b, h         ; high byte goes on the address bus
        ld c, 4         ; port number
        out (c), l      ; prints HL
        halt
prints 1000