Intel 8080/Коды команд
Этот документ создан для Emuverse и распространяется на условиях лицензии CC-BY-SA-3.0. |
Таблица кодов
Код2 | Код16 | Данные | Команда | Действие | Флаги | Такты |
---|---|---|---|---|---|---|
Группа 00 | ||||||
00 000 000 | 00 | NOP | 4 | |||
00 001 000 | 08 | ? | ||||
00 010 000 | 10 | ? | ||||
00 011 000 | 18 | ? | ||||
00 100 000 | 20 | ? (8085: RIM) | 8085: READ INT MASK | |||
00 101 000 | 28 | ? | ||||
00 110 000 | 30 | ? (8085: SIM) | 8085: SET INT MASK | |||
00 111 000 | 38 | ? | ||||
00 RP1 001 | DAD RP | HL <- HL + RP | 4 | |||
00 RP0 001 | DATA16 | LXI RP, DATA16 | RP <- DATA16 | 10 | ||
00 0R0 010 | STAX [R], A | [R] <- A | 7 | |||
00 0R1 010 | LDAX A, [R] | A <- [R] | 7 | |||
00 100 010 | 22 | ADDR16 | SHLD ADDR16 | [ADDR16] <- HL | 16 | |
00 101 010 | 2A | ADDR16 | LHLD ADDR16 | HL <- [ADDR16] | 16 | |
00 110 010 | 32 | ADDR16 | STA ADDR16 | [ADDR16] <- A | 13 | |
00 111 010 | 3A | ADDR16 | LDA ADDR16 | A <- [ADDR16] | 13 | |
00 RP1 011 | DCX RP | RP <- RP-1 | 5 | |||
00 RP0 011 | INX RP | RP <- RP+1 | 5 | |||
00 SSS 100 | INR SSS | SSS <- SSS+1 | 5/10 | |||
00 SSS 101 | DCR SSS | SSS <- SSS-1 | 5/10 | |||
00 DDD 110 | DATA8 | MVI DDD, DATA8 | DDD <- DATA8 | 7/11 | ||
00 000 111 | 07 | RLC | CY+A LEFT | 4 | ||
00 001 111 | 0F | RRC | CY+A RIGHT | 4 | ||
00 010 111 | 17 | RAL | CY+A CYCLE RIGHT | 4 | ||
00 011 111 | 1F | RAR | CY+A CYCLE LEFT | 4 | ||
00 100 111 | 27 | DAA | 5 | |||
00 101 111 | 2F | CMA | A <- NOT A | 4 | ||
00 110 111 | 37 | STC | CY = 1 | 4 | ||
00 111 111 | 3F | CMC | CY <- NOT CY | 4 | ||
Группа 01 | ||||||
01 110 110 | 76 | HLT | 7(?) | |||
01 DDD SSS | MOV DDD, SSS | DDD <- SSS | 5/7 | |||
Группа 10 | ||||||
10 000 SSS | ADD SSS | A <- A+SSS | 4/7 | |||
10 001 SSS | ADC SSS | A <- A+SSS+CY | 4/7 | |||
10 010 SSS | SUB SSS | A <- A-SSS | 4/7 | |||
10 011 SSS | SBB SSS | A <- A-SSS-CY | 4/7 | |||
10 100 SSS | ANA SSS | A <- A AND SSS | 4/7 | |||
10 101 SSS | XRA SSS | A <- A XOR SSS | 4/7 | |||
10 110 SSS | ORA SSS | A <- A OR SSS | 4/7 | |||
10 111 SSS | CMP SSS | COMPARE A, SSS | 4/7 | |||
Группа 11 | ||||||
11 XXX 000 | RETIF | RETURN IF XXX IS TRUE | 5 (10) | |||
11 RP0 001 | POP RP | 10 | ||||
11 001 001 | C9 | RET | 10 | |||
11 011 001 | D9 | ? | ||||
11 101 001 | E9 | PCHL | JMP [HL] | 5 | ||
11 111 001 | F9 | SPHL | SP <- HL | 5 | ||
11 XXX 010 | ADDR16 | JMP IF ADDR16 | JUMP IF XXX IS TRUE | 10 | ||
11 000 011 | C3 | ADDR16 | JMP ADDR16 | 10 | ||
11 010 011 | D3 | PORT8 | OUT PORT8 | [PORT8] <- A | 10 | |
11 011 011 | DB | PORT8 | IN PORT8 | A <- [PORT8] | 10 | |
11 100 011 | E3 | XTHL | [SP] <-> HL | 18 | ||
11 101 011 | EB | XCHG | DE <-> HL | 4 | ||
11 110 011 | F3 | DI | INT DISABLE | 4 | ||
11 111 011 | FB | EI | INT ENABLE | 4 | ||
11 XXX 100 | ADDR16 | CALLIF ADDR16 | CALL IF XXX IS TRUE | 11(17) | ||
11 RP0 101 | PUSH RP | 11 | ||||
11 001 101 | CD | ADDR16 | CALL ADDR16 | 17 | ||
11 011 101 | DD | ? | ||||
11 101 101 | ED | ? | ||||
11 111 101 | FD | ? | ||||
11 000 110 | C6 | DATA8 | ADI DATA8 | A <- A+DATA8 | 7 | |
11 001 110 | CE | DATA8 | ACI DATA8 | A <- A+DATA8+CY | 7 | |
11 010 110 | D6 | DATA8 | SUI DATA8 | A <- A-DATA8 | 7 | |
11 011 110 | DE | DATA8 | SBI DATA8 | A <- A-DATA8-CY | 7 | |
11 100 110 | E6 | DATA8 | ANI DATA8 | A <- A AND DATA8 | 7 | |
11 101 110 | EE | DATA8 | XRI DATA8 | A <- A XOR DATA8 | 7 | |
11 110 110 | F6 | DATA8 | ORI DATA8 | A <- A OR DATA8 | 7 | |
11 111 110 | FE | DATA8 | CPI DATA8 | COMPARE A, DATA8 | 7 | |
11 NNN 111 | RST NNN | INT NNN | 11 |
Расшифровка сокращений
- DDD, SSS
- 000=B
- 001=C
- 010=D
- 011=E
- 100=H
- 101=L
- 110=М (т.е. [HL])
- 111=A
- R
- 0=BC
- 1=DE
- RP
- 0=BC
- 1=DE
- 2=HL
- 3=SP или PSW (Status word) для PUSH/POP
- XXX
- 000: NOT ZERO
- 001: ZERO
- 010: NOT CARRY
- 011: CARRY
- 100: NOT PARITY
- 101: PARITY
- 110: POSITIVE
- 111: NEGATIVE