00h LD destination,source = load source with destination
40h ADD A,source          = add value in source to register A (A=A+source)
48h ADC A,source          = add with carry (A=A+source+cy)
50h SUB A,source          = substract source from A (A=A-source)
58h SBC A,source          = substract with carry (A=A-source-cy)
60h CMP A,source          = sets flags as SUB but leaves register A intact
68h AND A,source          = bitwise AND (A=A AND source)
70h OR A,source           = bitwise OR (A=A OR source)
78h XOR A,source          = bitwise XOR (A=A XOR source)
80h TEST A,source         = sets flags as AND but leaves register A intact
88h LD dest,nn            = load destination with an immediate value
90h INC destination       = increment destination (dest=dest+1)
98h DEC destination       = decrement destination (dest=dest-1)
a0h SHL destination       = shift left bits of destination (dest=dest*2)
a8h SHR destination       = shift right bits of destination (dest=dest/2)
b0h ROL destination       = rotate left bits of destination (wrap around)
b8h ROR destination       = rotate right bits of destination (-~-)
c0h RLC destination       = rotate left through carry (Cy<-dest<-Cy)
c8h RRC destination       = rotate right through carry (Cy->dest->Cy)
d0h PUSH reg16            = save reg16 on the stack (SP=SP-2;[SP]=reg16)
d4h POP reg16             = load reg16 from the stack (reg16=[SP];SP=SP+2)
d8h <16 bit operations>   = few operations on 16 bit registers
e0h <16 bit operations>   = few operations on 16 bit registers
e8h <special>             = instructions to help emulation
f0h CALL condition,adr    = value of PC is saved on the stack, JMP adr
f8h JMP condition,adr     = if condition is true, PC takes the value of ADR

   Because the instructions ld a,a; ld b,b ... do nothing they have been replaced with NOP (no operation)
   The special instructions normally do not exist in a CPU's instruction set. They were added to help the interface with the page
   The condition in the CALL, JMP instructions can be Z,NZ,C,NC,O,NO which means Zero, NotZero, Carry, No Carry, Overflow, No Overflow.
   DJNZ means Decrement and Jump if Not Zero ; it does BC=BC-1; JNZ @

 
  00h
  01h
  02h
  03h
  04h
  05h
  06h
  07h
  08h
NOP
LD A,(HL)
LD A,B
LD A,C
LD A,D
LD A,E
LD A,H
LD A,L
  08h
LD (HL),A
NOP
LD (HL),B
LD (HL),C
LD (HL),D
LD (HL),E
LD (HL),H
LD (HL),L
  10h
LD B,A
LD B,(HL)
NOP
LD B,C
LD B,D
LD B,E
LD B,H
LD B,L
  18h
LD C,A
LD C,(HL)
LD C,B
NOP
LD C,D
LD C,E
LD C,H
LD C,L
  20h
LD D,A
LD D,(HL)
LD D,B
LD D,C
NOP
LD D,E
LD D,H
LD D,L
  28h
LD E,A
LD E,(HL)
LD E,B
LD E,C
LD E,D
NOP
LD E,H
LD E,L
  30h
LD H,A
LD H,(HL)
LD H,B
LD H,C
LD H,D
LD H,E
NOP
LD H,L
  38h
LD L,A
LD L,(HL)
LD L,B
LD L,C
LD L,D
LD L,E
LD L,H
NOP
  40h
ADD A,A
ADD A,(HL)
ADD A,B
ADD A,C
ADD A,D
ADD A,E
ADD A,H
ADD A,L
  48h
ADC A,A
ADC A,(HL)
ADC A,B
ADC A,C
ADC A,D
ADC A,E
ADC A,H
ADC A,L
  50h
SUB A,A
SUB A,(HL)
SUB A,B
SUB A,C
SUB A,D
SUB A,E
SUB A,H
SUB A,L
  58h
SBC A,A
SBC A,(HL)
SBC A,B
SBC A,C
SBC A,D
SBC A,E
SBC A,H
SBC A,L
  60h
CMP A,A
CMP A,(HL)
CMP A,B
CMP A,C
CMP A,D
CMP A,E
CMP A,H
CMP A,L
  68h
AND A,A
AND A,(HL)
AND A,B
AND A,C
AND A,D
AND A,E
AND A,H
AND A,L
  70h
OR A,A
OR A,(HL)
OR A,B
OR A,C
OR A,D
OR A,E
OR A,H
OR A,L
  78h
XOR A,A
XOR A,(HL)
XOR A,B
XOR A,C
XOR A,D
XOR A,E
XOR A,H
XOR A,L
  80h
TEST A,A
TEST A,(HL)
TEST A,B
TEST A,C
TEST A,D
TEST A,E
TEST A,H
TEST A,L
  88h
LD A,n
LD (HL),n
LD B,n
LD C,n
LD D,n
LD E,n
LD H,n
LD L,n
  90h
INC A
INC (HL)
INC B
INC C
INC D
INC E
INC H
INC L
  98h
DEC A
DEC (HL)
DEC B
DEC C
DEC D
DEC E
DEC H
DEC L
  a0h
SHL A
SHL (HL)
SHL B
SHL C
SHL D
SHL E
SHL H
SHL L
  a8h
SHR A
SHR (HL)
SHR B
SHR C
SHR D
SHR E
SHR H
SHR L
  b0h
ROL A
ROL (HL)
ROL B
ROL C
ROL D
ROL E
ROL H
ROL L
  b8h
ROR A
ROR (HL)
ROR B
ROR C
ROR D
ROR E
ROR H
ROR L
  c0h
RCL A
RCL (HL)
RCL B
RCL C
RCL D
RCL E
RCL H
RCL L
  c8h
RCR A
RCR (HL)
RCR B
RCR C
RCR D
RCR E
RCR H
RCR L
  d0h
PUSH AF
PUSH BC
PUSH DE
PUSH HL
POP AF
POP BC
POP DE
POP HL
  d8h
LD BC,DE
LD BC,HL
LD DE,BC
LD DE,HL
LD HL,BC
LD HL,DE
ADD HL,BC
ADD HL,DE
  e0h
SBC HL,BC
SBC HL,DE
ADC HL,BC
ADC HL,DE
LD SP,HL
LD HL,SP
ADD SP,HL
LD SP,nn
  e8h
IN A
OUT A
WAIT
HALT
-
-
-
-
  f0h
CALL @
CALL C,@
CALL NC,@
CALL Z,@
CALL NZ,@
CALL O,@
CALL NO,@
RET nn
  f8h
JMP @
JMP C,@
JMP NC,@
JMP Z,@
JMP NZ,@
JMP O,@
JMP NO,@
DJNZ @

previous home next
1