z80: added z80bit flag to generated ddcb and fdcb 4 byte instructions

This commit is contained in:
Rob McMullen 2016-02-29 10:50:48 -08:00
parent d3c950d365
commit c924ce0fc2
2 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ while True:
if flags & 4 == z80bit:
opcode = (opcode << 16) + op[2]
# reread opcode table for real format string
length, mnemonic, mode = opcodeTable[opcode]
length, mnemonic, mode, flags = opcodeTable[opcode]
format = addressModeTable[mode]
operand = format.format(op[1])
else:

2
z80.py
View File

@ -1005,7 +1005,7 @@ def extra_opcodes(addr_table, op_table):
for fourth_byte, (instruction, addrmode) in enumerate(zip(mnemonics, addrmodes)):
opcode = (first_byte << 24) + (0xcb << 16) + fourth_byte
op_table[opcode] = [ 4, instruction, addrmode % x_or_y ]
op_table[opcode] = [ 4, instruction, addrmode % x_or_y, z80bit ]
extra_opcodes(addressModeTable, opcodeTable)
del extra_opcodes