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