Refine opcode 8080 table

This commit is contained in:
Nero 2019-10-25 13:14:15 +00:00
parent ad8a347d7d
commit 757a811988

View File

@ -9,15 +9,35 @@
; 0x00 none
; 0x1n reg8, opcode |= (reg8 << n)
; 0x2n reg16, opcode |= (reg8 << n)
; 0x3n 3-bit number, opcode |= (num << n)
; 0x3n reg16b, opcode |= (reg8 << n)
; 0x7n 3-bit number, opcode |= (num << n)
; 0x80 imm8, encoded as extra byte
; 0x81 imm16, encoded as extra word
reg8:
db "B",0,"C",0,"D",0,"E",0,"H",0,"L",0,"M",0
reg16:
db "BC", "DE", "HL", "SP"
registers:
.reg8:
db "B", 0
db "C", 0
db "D", 0
db "E", 0
db "H", 0
db "L", 0
db "M", 0
db 0
.reg16:
db "BC", 0
db "DE", 0
db "HL", 0
db "SP", 0
db 0
.reg16b:
db "BC", 0
db "DE", 0
db "HL", 0
db "AF", 0
db 0
.end:
db 0
opcodes:
; Data movement
@ -104,10 +124,10 @@ opcodes:
db 2, "RP", 0b11110000, 0x00, 0x00
db 2, "RM", 0b11111000, 0x00, 0x00
db 3, "RST", 0b11000111, 0x33, 0x00
db 3, "RST", 0b11000111, 0x73, 0x00
db 4, "PCHL", 0b11101001, 0x00, 0x00
db 4, "PUSH", 0b11000101, 0x24, 0x00
db 3, "POP", 0b11000001, 0x24, 0x00
db 4, "PUSH", 0b11000101, 0x34, 0x00
db 3, "POP", 0b11000001, 0x34, 0x00
db 4, "XTHL", 0b11100011, 0x00, 0x00
db 4, "SPHL", 0b11111001, 0x00, 0x00