8080 By Opcode

I constructed this table specifically for examining raw code and to aid in writing a disassembler.

OpcodeInstructionsizeflagsfunction
0x00 NOP1
0x01 LXI B,D163B <- byte 3, C <- byte 2
0x02 STAX B1(BC) <- A
0x03 INX B1BC <- BC+1
0x04 INR B1Z, S, P, ACB <- B+1
0x05 DCR B1Z, S, P, ACB <- B-1
0x06 MVI B, D82B <- byte 2
0x07 RLC1CYA = A << 1; bit 0 = prev bit 7; CY = prev bit 7
0x08 -
0x09 DAD B1CYHL = HL + BC
0x0a LDAX B1A <- (BC)
0x0b DCX B1BC = BC-1
0x0c INR C1Z, S, P, ACC <- C+1
0x0d DCR C1Z, S, P, ACC <-C-1
0x0e MVI C,D82C <- byte 2
0x0f RRC1CYA = A >> 1; bit 7 = prev bit 0; CY = prev bit 0
0x10 -
0x11 LXI D,D163D <- byte 3, E <- byte 2
0x12 STAX D1(DE) <- A
0x13 INX D1DE <- DE + 1
0x14 INR D1Z, S, P, ACD <- D+1
0x15 DCR D1Z, S, P, ACD <- D-1
0x16 MVI D, D82D <- byte 2
0x17 RAL1CYA = A << 1; bit 0 = prev CY; CY = prev bit 7
0x18 -
0x19 DAD D1CYHL = HL + DE
0x1a LDAX D1A <- (DE)
0x1b DCX D1DE = DE-1
0x1c INR E1Z, S, P, ACE <-E+1
0x1d DCR E1Z, S, P, ACE <- E-1
0x1e MVI E,D82E <- byte 2
0x1f RAR1CYA = A >> 1; bit 7 = prev bit 7; CY = prev bit 0
0x20 RIM1special
0x21 LXI H,D163H <- byte 3, L <- byte 2
0x22 SHLD adr3(adr) <-L; (adr+1)<-H
0x23 INX H1HL <- HL + 1
0x24 INR H1Z, S, P, ACH <- H+1
0x25 DCR H1Z, S, P, ACH <- H-1
0x26 MVI H,D82H <- byte 2
0x27 DAA1special
0x28 -
0x29 DAD H1CYHL = HL + HI
0x2a LHLD adr3L <- (adr); H<-(adr+1)
0x2b DCX H1HL = HL-1
0x2c INR L1Z, S, P, ACL <- L+1
0x2d DCR L1Z, S, P, ACL <- L-1
0x2e MVI L, D82L <- byte 2
0x2f CMA1A <- !A
0x30 SIM1special
0x31 LXI SP, D163SP.hi <- byte 3, SP.lo <- byte 2
0x32 STA adr3(adr) <- A
0x33 INX SP1SP = SP + 1
0x34 INR M1Z, S, P, AC(HL) <- (HL)+1
0x35 DCR M1Z, S, P, AC(HL) <- (HL)-1
0x36 MVI M,D82(HL) <- byte 2
0x37 STC1CYCY = 1
0x38 -
0x39 DAD SP1CYHL = HL + SP
0x3a LDA adr3A <- (adr)
0x3b DCX SP1SP = SP-1
0x3c INR A1Z, S, P, ACA <- A+1
0x3d DCR A1Z, S, P, ACA <- A-1
0x3e MVI A,D82A <- byte 2
0x3f CMC1CYCY=!CY
0x40 MOV B,B1B <- B
0x41 MOV B,C1B <- C
0x42 MOV B,D1B <- D
0x43 MOV B,E1B <- E
0x44 MOV B,H1B <- H
0x45 MOV B,L1B <- L
0x46 MOV B,M1B <- (HL)
0x47 MOV B,A1B <- A
0x48 MOV C,B1C <- B
0x49 MOV C,C1C <- C
0x4a MOV C,D1C <- D
0x4b MOV C,E1C <- E
0x4c MOV C,H1C <- H
0x4d MOV C,L1C <- L
0x4e MOV C,M1C <- (HL)
0x4f MOV C,A1C <- A
0x50 MOV D,B1D <- B
0x51 MOV D,C1D <- C
0x52 MOV D,D1D <- D
0x53 MOV D,E1D <- E
0x54 MOV D,H1D <- H
0x55 MOV D,L1D <- L
0x56 MOV D,M1D <- (HL)
0x57 MOV D,A1D <- A
0x58 MOV E,B1 E <- B
0x59 MOV E,C1E <- C
0x5a MOV E,D1E <- D
0x5b MOV E,E1E <- E
0x5c MOV E,H1E <- H
0x5d MOV E,L1E <- L
0x5e MOV E,M1E <- (HL)
0x5f MOV E,A1E <- A
0x60 MOV H,B1H <- B
0x61 MOV H,C1H <- C
0x62 MOV H,D1H <- D
0x63 MOV H,E1H <- E
0x64 MOV H,H1H <- H
0x65 MOV H,L1H <- L
0x66 MOV H,M1H <- (HL)
0x67 MOV H,A1H <- A
0x68 MOV L,B1L <- B
0x69 MOV L,C1L <- C
0x6a MOV L,D1L <- D
0x6b MOV L,E1L <- E
0x6c MOV L,H1L <- H
0x6d MOV L,L1L <- L
0x6e MOV L,M1L <- (HL)
0x6f MOV L,A1L <- A
0x70 MOV M,B1(HL) <- B
0x71 MOV M,C1(HL) <- C
0x72 MOV M,D1(HL) <- D
0x73 MOV M,E1(HL) <- E
0x74 MOV M,H1(HL) <- H
0x75 MOV M,L1(HL) <- L
0x76 HLT1special
0x77 MOV M,A1(HL) <- A
0x78 MOV A,B1A <- B
0x79 MOV A,C1A <- C
0x7a MOV A,D1A <- D
0x7b MOV A,E1A <- E
0x7c MOV A,H1A <- H
0x7d MOV A,L1A <- L
0x7e MOV A,M1A <- (HL)
0x7f MOV A,A1A <- A
0x80 ADD B1Z, S, P, CY, ACA <- A + B
0x81 ADD C1Z, S, P, CY, ACA <- A + C
0x82 ADD D1Z, S, P, CY, ACA <- A + D
0x83 ADD E1Z, S, P, CY, ACA <- A + E
0x84 ADD H1Z, S, P, CY, ACA <- A + H
0x85 ADD L1Z, S, P, CY, ACA <- A + L
0x86 ADD M1Z, S, P, CY, ACA <- A + (HL)
0x87 ADD A1Z, S, P, CY, ACA <- A + A
0x88 ADC B1Z, S, P, CY, ACA <- A + B + CY
0x89 ADC C1Z, S, P, CY, ACA <- A + C + CY
0x8a ADC D1Z, S, P, CY, ACA <- A + D + CY
0x8b ADC E1Z, S, P, CY, ACA <- A + E + CY
0x8c ADC H1Z, S, P, CY, ACA <- A + H + CY
0x8d ADC L1Z, S, P, CY, ACA <- A + L + CY
0x8e ADC M1Z, S, P, CY, ACA <- A + (HL) + CY
0x8f ADC A1Z, S, P, CY, ACA <- A + A + CY
0x90 SUB B1Z, S, P, CY, ACA <- A - B
0x91 SUB C1Z, S, P, CY, ACA <- A - C
0x92 SUB D1Z, S, P, CY, ACA <- A + D
0x93 SUB E1Z, S, P, CY, ACA <- A - E
0x94 SUB H1Z, S, P, CY, ACA <- A + H
0x95 SUB L1Z, S, P, CY, ACA <- A - L
0x96 SUB M1Z, S, P, CY, ACA <- A + (HL)
0x97 SUB A1Z, S, P, CY, ACA <- A - A
0x98 SBB B1Z, S, P, CY, ACA <- A - B - CY
0x99 SBB C1Z, S, P, CY, ACA <- A - C - CY
0x9a SBB D1Z, S, P, CY, ACA <- A - D - CY
0x9b SBB E1Z, S, P, CY, ACA <- A - E - CY
0x9c SBB H1Z, S, P, CY, ACA <- A - H - CY
0x9d SBB L1Z, S, P, CY, ACA <- A - L - CY
0x9e SBB M1Z, S, P, CY, ACA <- A - (HL) - CY
0x9f SBB A1Z, S, P, CY, ACA <- A - A - CY
0xa0 ANA B1Z, S, P, CY, ACA <- A & B
0xa1 ANA C1Z, S, P, CY, ACA <- A & C
0xa2 ANA D1Z, S, P, CY, ACA <- A & D
0xa3 ANA E1Z, S, P, CY, ACA <- A & E
0xa4 ANA H1Z, S, P, CY, ACA <- A & H
0xa5 ANA L1Z, S, P, CY, ACA <- A & L
0xa6 ANA M1Z, S, P, CY, ACA <- A & (HL)
0xa7 ANA A1Z, S, P, CY, ACA <- A & A
0xa8 XRA B1Z, S, P, CY, ACA <- A ^ B
0xa9 XRA C1Z, S, P, CY, ACA <- A ^ C
0xaa XRA D1Z, S, P, CY, ACA <- A ^ D
0xab XRA E1Z, S, P, CY, ACA <- A ^ E
0xac XRA H1Z, S, P, CY, ACA <- A ^ H
0xad XRA L1Z, S, P, CY, ACA <- A ^ L
0xae XRA M1Z, S, P, CY, ACA <- A ^ (HL)
0xaf XRA A1Z, S, P, CY, ACA <- A ^ A
0xb0 ORA B1Z, S, P, CY, ACA <- A | B
0xb1 ORA C1Z, S, P, CY, ACA <- A | C
0xb2 ORA D1Z, S, P, CY, ACA <- A | D
0xb3 ORA E1Z, S, P, CY, ACA <- A | E
0xb4 ORA H1Z, S, P, CY, ACA <- A | H
0xb5 ORA L1Z, S, P, CY, ACA <- A | L
0xb6 ORA M1Z, S, P, CY, ACA <- A | (HL)
0xb7 ORA A1Z, S, P, CY, ACA <- A | A
0xb8 CMP B1Z, S, P, CY, ACA - B
0xb9 CMP C1Z, S, P, CY, ACA - C
0xba CMP D1Z, S, P, CY, ACA - D
0xbb CMP E1Z, S, P, CY, ACA - E
0xbc CMP H1Z, S, P, CY, ACA - H
0xbd CMP L1Z, S, P, CY, ACA - L
0xbe CMP M1Z, S, P, CY, ACA - (HL)
0xbf CMP A1Z, S, P, CY, ACA - A
0xc0 RNZ1if NZ, RET
0xc1 POP B1C <- (sp); B <- (sp+1); sp <- sp+2
0xc2 JNZ adr3if NZ, PC <- adr
0xc3 JMP adr3PC <= adr
0xc4 CNZ adr3if NZ, CALL adr
0xc5 PUSH B1(sp-2)<-C; (sp-1)<-B; sp <- sp - 2
0xc6 ADI D82Z, S, P, CY, ACA <- A + byte
0xc7 RST 01CALL $0
0xc8 RZ1if Z, RET
0xc9 RET1PC.lo <- (sp); PC.hi<-(sp+1); SP <- SP+2
0xca JZ adr3if Z, PC <- adr
0xcb -
0xcc CZ adr3if Z, CALL adr
0xcd CALL adr3(SP-1)<-PC.hi;(SP-2)<-PC.lo;SP<-SP+2;PC=adr
0xce ACI D82Z, S, P, CY, ACA <- A + data + CY
0xcf RST 11CALL $8
0xd0 RNC1if NCY, RET
0xd1 POP D1E <- (sp); D <- (sp+1); sp <- sp+2
0xd2 JNC adr3if NCY, PC<-adr
0xd3 OUT D82special
0xd4 CNC adr3if NCY, CALL adr
0xd5 PUSH D1(sp-2)<-E; (sp-1)<-D; sp <- sp - 2
0xd6 SUI D82Z, S, P, CY, ACA <- A - data
0xd7 RST 21CALL $10
0xd8 RC1if CY, RET
0xd9 -
0xda JC adr3if CY, PC<-adr
0xdb IN D82special
0xdc CC adr3if CY, CALL adr
0xdd -
0xde SBI D82Z, S, P, CY, ACA <- A - data - CY
0xdf RST 31CALL $18
0xe0 RPO1if PO, RET
0xe1 POP H1L <- (sp); H <- (sp+1); sp <- sp+2
0xe2 JPO adr3if PO, PC <- adr
0xe3 XTHL1L <-> (SP); H <-> (SP+1)
0xe4 CPO adr3if PO, CALL adr
0xe5 PUSH H1(sp-2)<-L; (sp-1)<-H; sp <- sp - 2
0xe6 ANI D82Z, S, P, CY, ACA <- A & data
0xe7 RST 41CALL $20
0xe8 RPE1if PE, RET
0xe9 PCHL1PC.hi <- H; PC.lo <- L
0xea JPE adr3if PE, PC <- adr
0xeb XCHG1H <-> D; L <-> E
0xec CPE adr3if PE, CALL adr
0xed -
0xee XRI D82Z, S, P, CY, ACA <- A ^ data
0xef RST 51CALL $28
0xf0 RP1if P, RET
0xf1 POP PSW1flags <- (sp); A <- (sp+1); sp <- sp+2
0xf2 JP adr3if P=1 PC <- adr
0xf3 DI1special
0xf4 CP adr3if P, PC <- adr
0xf5 PUSH PSW1(sp-2)<-flags; (sp-1)<-A; sp <- sp - 2
0xf6 ORI D82Z, S, P, CY, ACA <- A | data
0xf7 RST 61CALL $30
0xf8 RM1if M, RET
0xf9 SPHL1SP=HL
0xfa JM adr3if M, PC <- adr
0xfb EI1special
0xfc CM adr3if M, CALL adr
0xfd -
0xfe CPI D82Z, S, P, CY, ACA - data
0xff RST 71CALL $38