histcomp:8080

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
histcomp:8080 [2023-01-08 00:56] asdfhistcomp:8080 [2024-08-28 04:27] (current) asdf
Line 1: Line 1:
 ====== Intel 8080 ====== ====== Intel 8080 ======
 +A massively popular and influential 8-bit microprocessor originally released in 1974. Among other uses, it powered the [[Altair 8800]] and served as the basis for the [[Z80]] and the [[LR35902]].
  
-<file text 8080.lark> +===== Architecture ===== 
-%import common.HEXDIGIT +The 8080 has the following registers:
-%import common.ESCAPED_STRING +
-%import common.WS+
  
-IDENT: /[a-zA-Z_]+/+^  15...8  ^  7...0  ^ ^ 
 +|  A  |  F  |  PSW  | 
 +|  B  |  C  |  B  |  
 +|  D  |  E  |  D  | 
 +|  H  |  L  |  H  | 
 +|  SP  || 
 +|  PC  ||
  
-COMMENT/;[^\n]*/+Flags register:
  
-A16: HEXDIGIT ~ "h" | IDENT +^ 7 ^ 6 ^ 5 ^ ^ 3 ^ ^ 1 ^ 0 ^ 
-D16: HEXDIGIT ~ 4 "h" +| C |
-D8: HEXDIGIT ~ "h" +
-    +
-REG16: "A" "AF" "PSW" +
-     "B" "BC" +
-     "D" "DE" +
-     "H" +
-     "SP" +
-      +
-REG8: "A" +
-    | "B" +
-    | "C+
-    | "D" +
-    | "H" +
-    | "L" +
-    "M"+
  
-start: (label|directive|instruction)*+Like its descendants, the 8080 stores addresses in little-endian format and has a stack that grows downward. 
  
-label: IDENT ":"+===== Instruction set ===== 
 +<table |tab_opcodes> 
 +<caption>Opcode table [(pastraiser8080)]</caption> 
 +^  ^ x0 ^ x1 ^ x2 ^ x3 ^ x4 ^ x5 ^ x6 ^ x7 ^ x8 ^ x9 ^ xA ^ xB ^ xC ^ xD ^ xE ^ xF ^ 
 +^ 0x | NOP | LXI B,d16 | STAX B | INX B | INR B | DCR B | MVI B,d8 | MVI B,d8 | *NOP | DAD B | LDAX B | DCX B | INR C | DCR C | MVI C,d8 | RRC | 
 +^ 1x | *NOP | LXI D,d16 | STAX D | INX D | INR D | DCR D | MVI D,d8 | RAL | *NOP | DAD D | LDAX D | DCX D | INR E | DCR E | MVI E,d8 | RAR | 
 +^ 2x | *NOP | LXI H,d16 | SHLD a16 | INX H | INR H | DCR H | MVI H,d8 | DAA | *NOP | DAD H | LHLD a16 | DCX H | INR L | DCR L | MVI L,d8 | CMA | 
 +^ 3x | *NOP | LXI SP,d16 | STA a16 | INX SP | INR M | DCR M | MVI M,d8 | STC | *NOP | DAD SP | LDA a16 | DCX SP | INR A | DCR A | MVI A,d8 | CMC | 
 +^ 4x | MOV B,B | MOV B,C | MOV B,D | MOV B,E | MOV B,H | MOV B,L | MOV B,M | MOV B,A | MOV C,B | MOV C,C | MOV C,D | MOV C,E | MOV C,H | MOV C,L | MOV C,M | MOV C,A | 
 +^ 5x | MOV D,B | MOV D,C | MOV D,D | MOV D,E | MOV D,H | MOV D,L | MOV D,M | MOV D,A | MOV E,B | MOV E,C | MOV E,D | MOV E,E | MOV E,H | MOV E,L | MOV E,M | MOV E,A | 
 +^ 6x | MOV H,B | MOV H,C | MOV H,D | MOV H,E | MOV H,H | MOV H,L | MOV H,M | MOV H,A | MOV L,B | MOV L,C | MOV L,D | MOV L,E | MOV L,H | MOV L,L | MOV L,M | MOV L,A | 
 +^ 7x | MOV M,B | MOV M,C | MOV M,D | MOV M,E | MOV M,H | MOV M,L | HLT | MOV M,A | MOV A,B | MOV A,C | MOV A,D | MOV A,E | MOV A,H | MOV A,L | MOV A,M | MOV A,A | 
 +^ 8x | ADD B | ADD C | ADD D | ADD E | ADD H | ADD L | ADD M | ADD A | ADC B | ADC C | ADC D | ADC E | ADC H | ADC L | ADC M | ADC A | 
 +^ 9x | SUB B | SUB C | SUB D | SUB E | SUB H | SUB L | SUB M | SUB A | SBB B | SBB C | SBB D | SBB E | SBB H | SBB L | SBB M | SBB A | 
 +^ Ax | ANA B | ANA C | ANA D | ANA E | ANA H | ANA L | ANA M | ANA A | XRA B | XRA C | XRA D | XRA E | XRA H | XRA L | XRA M | XRA A | 
 +^ Bx | ORA B | ORA C | ORA D | ORA E | ORA H | ORA L | ORA M | ORA A | CMP B | CMP C | CMP D | CMP E | CMP H | CMP L | CMP M | CMP A | 
 +^ Cx | RNZ | POP B | JNZ a16 | JMP a16 | CNZ a16 | PUSH B | ADI d8 | RST 0 | RZ | RET | JZ a16 | *JMP a16 | CZ a16 | CALL a16 | ACI d8 | RST 1 | 
 +^ Dx | RNC | POP D | JNC a16 | OUT d8 | CNC a16 | PUSH D | SUI d8 | RST 2 | RC | *RET | JC a16 | IN d8 | CC a16 | *CALL a16 | SBI d8 | RST 3 | 
 +^ Ex | RPO | POP H | JPO a16 | XTHL | CPO a16 | PUSH H | ANI d8 | RST 4 | RPE | PCHL | JPE a16 | XCHG | CPE a16 | *CALL a16 | XRI d8 | RST 5 | 
 +^ Fx | RP | POP PSW | JP a16 | DI | CP a16 | PUSH PSW | ORI d8 | RST 6 | RM | SPHL | JM a16 | EI | CM a16 | *CALL a16 | CPI d8 | RST 7 | 
 +</table>
  
-directive: "ORG"i A16 
-         | "DB"i (D8+ | ESCAPED_STRING) 
  
-instructionCONTROL +===== Resources ===== 
-           JUMP +  * [[https://altairclone.com/downloads/manuals/8080%20Programmers%20Manual.pdf|8080 programmer's manual]] 
-           | CALL +  * [[https://pastraiser.com/cpu/i8080/i8080_opcodes.html|8080 opcode table]]
-           | RESET +
-           | MOVE16 +
-           | ARITH16 +
-           | MOVE8 +
-           | ARITH8 +
-           | RET +
-            +
-CONTROL"EI"+
-       | "DI"+
-       | "NOP"+
-       | "HLT"+
-       | "IN"i D8 +
-       "OUT"i D8+
  
-JUMP: ("JNZ"i|"JNC"i|"JPO"i|"JP"i|"JZ"i|"JC"i|"JPE"i|"JM"i|"JMP"iA16 +===== References ===== 
-    | "PCHL"i+[(pastraiser8080>https://pastraiser.com/cpu/i8080/i8080_opcodes.html)]
  
-CALL: ("CNZ"i|"CNC"i|"CPO"i|"CP"i|"CZ"i|"CC"i|"CPE"i|"CM"i|"CALL"i) A16 +~~REFNOTES~~
- +
-RET: "RNZ"+
-   | "RNC"+
-   | "RPO"+
-   | "RP"+
-   | "RZ"+
-   | "RC"+
-   | "RPE"+
-   | "RM"+
-   | "RET"+
-    +
-RESET: "RST"i "0".."7" +
- +
-MOVE16: ("POP"i|"PUSH"i) REG16 +
-      | "XCHG"+
-      | "SPHL"+
-      | "LXI"i REG16 D16 +
-      | ("SHLD"i|"LHLD"i) A16 +
-       +
-ARITH16: ("INX"i|"DAD"i|"DCX"i) REG16 +
- +
-MOVE8: "MOV"i REG8 "," REG8 +
-     | ("STAX"i|"LDAX"i) REG16 +
-     | "MVI"i REG8 "," D8 +
-     | ("LDA"i|"STA"i) A16 +
- +
-ARITH8: ("ADD"i|"ADC"i) REG8 | ("ADI"i|"ACI"i) D8 +
-      | ("SUB"i|"SBB"i) REG8 | ("SUI"i|"SBI"i) D8 +
-      | "ANA"i REG8 | "ANI"i D8 +
-      | "XRA"i REG8 | "XRI"i D8 +
-      | "ORA"i REG8 | "ORI"i D8 +
-      | "CMP"i REG8 | "CPI"i D8 +
-      | ("INR"i|"DCR"i) REG8 +
-      | "RLC"+
-      | "RAL"+
-      | "DAA"+
-      | "STC"+
-      | "RRC"+
-      | "RAR"+
-      | "CMA"+
-      | "CMC"+
- +
-%ignore COMMENT +
-%ignore WS +
-</file>+
  • histcomp/8080.1673139374.txt.gz
  • Last modified: 2023-01-08 00:56
  • by asdf