|
- /* Copyright (C) 2014-2016 Ben Kurtovic <ben.kurtovic@gmail.com>
- Released under the terms of the MIT License. See LICENSE for details. */
-
- static DispatchTable instruction_table = {
- [0x00] = z80_inst_nop,
- [0x01] = z80_inst_ld_dd_nn,
- [0x02] = z80_inst_ld_bcde_a,
- [0x03] = z80_inst_inc_ss,
- [0x04] = z80_inst_inc_r,
- [0x05] = z80_inst_dec_r,
- [0x06] = z80_inst_ld_r_n,
- [0x07] = z80_inst_unimplemented, // TODO
- [0x08] = z80_inst_ex_af_af,
- [0x09] = z80_inst_add_hl_ss,
- [0x0A] = z80_inst_unimplemented, // TODO
- [0x0B] = z80_inst_dec_ss,
- [0x0C] = z80_inst_inc_r,
- [0x0D] = z80_inst_dec_r,
- [0x0E] = z80_inst_ld_r_n,
- [0x0F] = z80_inst_unimplemented, // TODO
- [0x10] = z80_inst_djnz_e,
- [0x11] = z80_inst_ld_dd_nn,
- [0x12] = z80_inst_ld_bcde_a,
- [0x13] = z80_inst_inc_ss,
- [0x14] = z80_inst_inc_r,
- [0x15] = z80_inst_dec_r,
- [0x16] = z80_inst_ld_r_n,
- [0x17] = z80_inst_unimplemented, // TODO
- [0x18] = z80_inst_jr_e,
- [0x19] = z80_inst_add_hl_ss,
- [0x1A] = z80_inst_unimplemented, // TODO
- [0x1B] = z80_inst_dec_ss,
- [0x1C] = z80_inst_inc_r,
- [0x1D] = z80_inst_dec_r,
- [0x1E] = z80_inst_ld_r_n,
- [0x1F] = z80_inst_unimplemented, // TODO
- [0x20] = z80_inst_jr_cc_e,
- [0x21] = z80_inst_ld_dd_nn,
- [0x22] = z80_inst_ld_nn_hl,
- [0x23] = z80_inst_inc_ss,
- [0x24] = z80_inst_inc_r,
- [0x25] = z80_inst_dec_r,
- [0x26] = z80_inst_ld_r_n,
- [0x27] = z80_inst_unimplemented, // TODO
- [0x28] = z80_inst_jr_cc_e,
- [0x29] = z80_inst_add_hl_ss,
- [0x2A] = z80_inst_ld_hl_nn,
- [0x2B] = z80_inst_dec_ss,
- [0x2C] = z80_inst_inc_r,
- [0x2D] = z80_inst_dec_r,
- [0x2E] = z80_inst_ld_r_n,
- [0x2F] = z80_inst_unimplemented, // TODO
- [0x30] = z80_inst_jr_cc_e,
- [0x31] = z80_inst_ld_dd_nn,
- [0x32] = z80_inst_ld_nn_a,
- [0x33] = z80_inst_inc_ss,
- [0x34] = z80_inst_inc_hl,
- [0x35] = z80_inst_dec_hl,
- [0x36] = z80_inst_ld_hl_n,
- [0x37] = z80_inst_unimplemented, // TODO
- [0x38] = z80_inst_jr_cc_e,
- [0x39] = z80_inst_add_hl_ss,
- [0x3A] = z80_inst_ld_a_nn,
- [0x3B] = z80_inst_dec_ss,
- [0x3C] = z80_inst_inc_r,
- [0x3D] = z80_inst_dec_r,
- [0x3E] = z80_inst_ld_r_n,
- [0x3F] = z80_inst_unimplemented, // TODO
- [0x40] = z80_inst_ld_r_r,
- [0x41] = z80_inst_ld_r_r,
- [0x42] = z80_inst_ld_r_r,
- [0x43] = z80_inst_ld_r_r,
- [0x44] = z80_inst_ld_r_r,
- [0x45] = z80_inst_ld_r_r,
- [0x46] = z80_inst_ld_r_hl,
- [0x47] = z80_inst_ld_r_r,
- [0x48] = z80_inst_ld_r_r,
- [0x49] = z80_inst_ld_r_r,
- [0x4A] = z80_inst_ld_r_r,
- [0x4B] = z80_inst_ld_r_r,
- [0x4C] = z80_inst_ld_r_r,
- [0x4D] = z80_inst_ld_r_r,
- [0x4E] = z80_inst_ld_r_hl,
- [0x4F] = z80_inst_ld_r_r,
- [0x50] = z80_inst_ld_r_r,
- [0x51] = z80_inst_ld_r_r,
- [0x52] = z80_inst_ld_r_r,
- [0x53] = z80_inst_ld_r_r,
- [0x54] = z80_inst_ld_r_r,
- [0x55] = z80_inst_ld_r_r,
- [0x56] = z80_inst_ld_r_hl,
- [0x57] = z80_inst_ld_r_r,
- [0x58] = z80_inst_ld_r_r,
- [0x59] = z80_inst_ld_r_r,
- [0x5A] = z80_inst_ld_r_r,
- [0x5B] = z80_inst_ld_r_r,
- [0x5C] = z80_inst_ld_r_r,
- [0x5D] = z80_inst_ld_r_r,
- [0x5E] = z80_inst_ld_r_hl,
- [0x5F] = z80_inst_ld_r_r,
- [0x60] = z80_inst_ld_r_r,
- [0x61] = z80_inst_ld_r_r,
- [0x62] = z80_inst_ld_r_r,
- [0x63] = z80_inst_ld_r_r,
- [0x64] = z80_inst_ld_r_r,
- [0x65] = z80_inst_ld_r_r,
- [0x66] = z80_inst_ld_r_hl,
- [0x67] = z80_inst_ld_r_r,
- [0x68] = z80_inst_ld_r_r,
- [0x69] = z80_inst_ld_r_r,
- [0x6A] = z80_inst_ld_r_r,
- [0x6B] = z80_inst_ld_r_r,
- [0x6C] = z80_inst_ld_r_r,
- [0x6D] = z80_inst_ld_r_r,
- [0x6E] = z80_inst_ld_r_hl,
- [0x6F] = z80_inst_ld_r_r,
- [0x70] = z80_inst_ld_hl_r,
- [0x71] = z80_inst_ld_hl_r,
- [0x72] = z80_inst_ld_hl_r,
- [0x73] = z80_inst_ld_hl_r,
- [0x74] = z80_inst_ld_hl_r,
- [0x75] = z80_inst_ld_hl_r,
- [0x76] = z80_inst_halt,
- [0x77] = z80_inst_ld_hl_r,
- [0x78] = z80_inst_ld_r_r,
- [0x79] = z80_inst_ld_r_r,
- [0x7A] = z80_inst_ld_r_r,
- [0x7B] = z80_inst_ld_r_r,
- [0x7C] = z80_inst_ld_r_r,
- [0x7D] = z80_inst_ld_r_r,
- [0x7E] = z80_inst_ld_r_hl,
- [0x7F] = z80_inst_ld_r_r,
- [0x80] = z80_inst_unimplemented, // TODO
- [0x81] = z80_inst_unimplemented, // TODO
- [0x82] = z80_inst_unimplemented, // TODO
- [0x83] = z80_inst_unimplemented, // TODO
- [0x84] = z80_inst_unimplemented, // TODO
- [0x85] = z80_inst_unimplemented, // TODO
- [0x86] = z80_inst_unimplemented, // TODO
- [0x87] = z80_inst_unimplemented, // TODO
- [0x88] = z80_inst_unimplemented, // TODO
- [0x89] = z80_inst_unimplemented, // TODO
- [0x8A] = z80_inst_unimplemented, // TODO
- [0x8B] = z80_inst_unimplemented, // TODO
- [0x8C] = z80_inst_unimplemented, // TODO
- [0x8D] = z80_inst_unimplemented, // TODO
- [0x8E] = z80_inst_unimplemented, // TODO
- [0x8F] = z80_inst_unimplemented, // TODO
- [0x90] = z80_inst_unimplemented, // TODO
- [0x91] = z80_inst_unimplemented, // TODO
- [0x92] = z80_inst_unimplemented, // TODO
- [0x93] = z80_inst_unimplemented, // TODO
- [0x94] = z80_inst_unimplemented, // TODO
- [0x95] = z80_inst_unimplemented, // TODO
- [0x96] = z80_inst_unimplemented, // TODO
- [0x97] = z80_inst_unimplemented, // TODO
- [0x98] = z80_inst_unimplemented, // TODO
- [0x99] = z80_inst_unimplemented, // TODO
- [0x9A] = z80_inst_unimplemented, // TODO
- [0x9B] = z80_inst_unimplemented, // TODO
- [0x9C] = z80_inst_unimplemented, // TODO
- [0x9D] = z80_inst_unimplemented, // TODO
- [0x9E] = z80_inst_unimplemented, // TODO
- [0x9F] = z80_inst_unimplemented, // TODO
- [0xA0] = z80_inst_unimplemented, // TODO
- [0xA1] = z80_inst_unimplemented, // TODO
- [0xA2] = z80_inst_unimplemented, // TODO
- [0xA3] = z80_inst_unimplemented, // TODO
- [0xA4] = z80_inst_unimplemented, // TODO
- [0xA5] = z80_inst_unimplemented, // TODO
- [0xA6] = z80_inst_unimplemented, // TODO
- [0xA7] = z80_inst_unimplemented, // TODO
- [0xA8] = z80_inst_xor_r,
- [0xA9] = z80_inst_xor_r,
- [0xAA] = z80_inst_xor_r,
- [0xAB] = z80_inst_xor_r,
- [0xAC] = z80_inst_xor_r,
- [0xAD] = z80_inst_xor_r,
- [0xAE] = z80_inst_unimplemented, // TODO
- [0xAF] = z80_inst_xor_r,
- [0xB0] = z80_inst_or_r,
- [0xB1] = z80_inst_or_r,
- [0xB2] = z80_inst_or_r,
- [0xB3] = z80_inst_or_r,
- [0xB4] = z80_inst_or_r,
- [0xB5] = z80_inst_or_r,
- [0xB6] = z80_inst_unimplemented, // TODO
- [0xB7] = z80_inst_or_r,
- [0xB8] = z80_inst_cp_r,
- [0xB9] = z80_inst_cp_r,
- [0xBA] = z80_inst_cp_r,
- [0xBB] = z80_inst_cp_r,
- [0xBC] = z80_inst_cp_r,
- [0xBD] = z80_inst_cp_r,
- [0xBE] = z80_inst_cp_hl,
- [0xBF] = z80_inst_cp_r,
- [0xC0] = z80_inst_ret_cc,
- [0xC1] = z80_inst_pop_qq,
- [0xC2] = z80_inst_jp_cc_nn,
- [0xC3] = z80_inst_jp_nn,
- [0xC4] = z80_inst_call_cc_nn,
- [0xC5] = z80_inst_push_qq,
- [0xC6] = z80_inst_unimplemented, // TODO
- [0xC7] = z80_inst_rst_p,
- [0xC8] = z80_inst_ret_cc,
- [0xC9] = z80_inst_ret,
- [0xCA] = z80_inst_jp_cc_nn,
- [0xCB] = z80_prefix_bits,
- [0xCC] = z80_inst_call_cc_nn,
- [0xCD] = z80_inst_call_nn,
- [0xCE] = z80_inst_unimplemented, // TODO
- [0xCF] = z80_inst_rst_p,
- [0xD0] = z80_inst_ret_cc,
- [0xD1] = z80_inst_pop_qq,
- [0xD2] = z80_inst_jp_cc_nn,
- [0xD3] = z80_inst_out_n_a,
- [0xD4] = z80_inst_call_cc_nn,
- [0xD5] = z80_inst_push_qq,
- [0xD6] = z80_inst_sub_n,
- [0xD7] = z80_inst_rst_p,
- [0xD8] = z80_inst_ret_cc,
- [0xD9] = z80_inst_exx,
- [0xDA] = z80_inst_jp_cc_nn,
- [0xDB] = z80_inst_in_a_n,
- [0xDC] = z80_inst_call_cc_nn,
- [0xDD] = z80_prefix_index,
- [0xDE] = z80_inst_unimplemented, // TODO
- [0xDF] = z80_inst_rst_p,
- [0xE0] = z80_inst_ret_cc,
- [0xE1] = z80_inst_pop_qq,
- [0xE2] = z80_inst_jp_cc_nn,
- [0xE3] = z80_inst_ex_sp_hl,
- [0xE4] = z80_inst_call_cc_nn,
- [0xE5] = z80_inst_push_qq,
- [0xE6] = z80_inst_and_n,
- [0xE7] = z80_inst_rst_p,
- [0xE8] = z80_inst_ret_cc,
- [0xE9] = z80_inst_unimplemented, // TODO
- [0xEA] = z80_inst_jp_cc_nn,
- [0xEB] = z80_inst_ex_de_hl,
- [0xEC] = z80_inst_call_cc_nn,
- [0xED] = z80_prefix_extended,
- [0xEE] = z80_inst_xor_n,
- [0xEF] = z80_inst_rst_p,
- [0xF0] = z80_inst_ret_cc,
- [0xF1] = z80_inst_pop_qq,
- [0xF2] = z80_inst_jp_cc_nn,
- [0xF3] = z80_inst_di,
- [0xF4] = z80_inst_call_cc_nn,
- [0xF5] = z80_inst_push_qq,
- [0xF6] = z80_inst_or_n,
- [0xF7] = z80_inst_rst_p,
- [0xF8] = z80_inst_ret_cc,
- [0xF9] = z80_inst_unimplemented, // TODO
- [0xFA] = z80_inst_jp_cc_nn,
- [0xFB] = z80_inst_ei,
- [0xFC] = z80_inst_call_cc_nn,
- [0xFD] = z80_prefix_index,
- [0xFE] = z80_inst_cp_n,
- [0xFF] = z80_inst_rst_p
- };
-
- static DispatchTable instruction_table_extended = {
- [0x00] = z80_inst_nop2,
- [0x01] = z80_inst_nop2,
- [0x02] = z80_inst_nop2,
- [0x03] = z80_inst_nop2,
- [0x04] = z80_inst_nop2,
- [0x05] = z80_inst_nop2,
- [0x06] = z80_inst_nop2,
- [0x07] = z80_inst_nop2,
- [0x08] = z80_inst_nop2,
- [0x09] = z80_inst_nop2,
- [0x0A] = z80_inst_nop2,
- [0x0B] = z80_inst_nop2,
- [0x0C] = z80_inst_nop2,
- [0x0D] = z80_inst_nop2,
- [0x0E] = z80_inst_nop2,
- [0x0F] = z80_inst_nop2,
- [0x10] = z80_inst_nop2,
- [0x11] = z80_inst_nop2,
- [0x12] = z80_inst_nop2,
- [0x13] = z80_inst_nop2,
- [0x14] = z80_inst_nop2,
- [0x15] = z80_inst_nop2,
- [0x16] = z80_inst_nop2,
- [0x17] = z80_inst_nop2,
- [0x18] = z80_inst_nop2,
- [0x19] = z80_inst_nop2,
- [0x1A] = z80_inst_nop2,
- [0x1B] = z80_inst_nop2,
- [0x1C] = z80_inst_nop2,
- [0x1D] = z80_inst_nop2,
- [0x1E] = z80_inst_nop2,
- [0x1F] = z80_inst_nop2,
- [0x20] = z80_inst_nop2,
- [0x21] = z80_inst_nop2,
- [0x22] = z80_inst_nop2,
- [0x23] = z80_inst_nop2,
- [0x24] = z80_inst_nop2,
- [0x25] = z80_inst_nop2,
- [0x26] = z80_inst_nop2,
- [0x27] = z80_inst_nop2,
- [0x28] = z80_inst_nop2,
- [0x29] = z80_inst_nop2,
- [0x2A] = z80_inst_nop2,
- [0x2B] = z80_inst_nop2,
- [0x2C] = z80_inst_nop2,
- [0x2D] = z80_inst_nop2,
- [0x2E] = z80_inst_nop2,
- [0x2F] = z80_inst_nop2,
- [0x30] = z80_inst_nop2,
- [0x31] = z80_inst_nop2,
- [0x32] = z80_inst_nop2,
- [0x33] = z80_inst_nop2,
- [0x34] = z80_inst_nop2,
- [0x35] = z80_inst_nop2,
- [0x36] = z80_inst_nop2,
- [0x37] = z80_inst_nop2,
- [0x38] = z80_inst_nop2,
- [0x39] = z80_inst_nop2,
- [0x3A] = z80_inst_nop2,
- [0x3B] = z80_inst_nop2,
- [0x3C] = z80_inst_nop2,
- [0x3D] = z80_inst_nop2,
- [0x3E] = z80_inst_nop2,
- [0x3F] = z80_inst_nop2,
- [0x40] = z80_inst_in_r_c,
- [0x41] = z80_inst_out_c_r,
- [0x42] = z80_inst_sbc_hl_ss,
- [0x43] = z80_inst_ld_nn_dd,
- [0x44] = z80_inst_unimplemented, // TODO
- [0x45] = z80_inst_retn,
- [0x46] = z80_inst_im,
- [0x47] = z80_inst_unimplemented, // TODO
- [0x48] = z80_inst_in_r_c,
- [0x49] = z80_inst_out_c_r,
- [0x4A] = z80_inst_unimplemented, // TODO
- [0x4B] = z80_inst_ld_dd_inn,
- [0x4C] = z80_inst_unimplemented, // TODO
- [0x4D] = z80_inst_reti,
- [0x4E] = z80_inst_im,
- [0x4F] = z80_inst_unimplemented, // TODO
- [0x50] = z80_inst_in_r_c,
- [0x51] = z80_inst_out_c_r,
- [0x52] = z80_inst_sbc_hl_ss,
- [0x53] = z80_inst_ld_nn_dd,
- [0x54] = z80_inst_unimplemented, // TODO
- [0x55] = z80_inst_retn,
- [0x56] = z80_inst_im,
- [0x57] = z80_inst_unimplemented, // TODO
- [0x58] = z80_inst_in_r_c,
- [0x59] = z80_inst_out_c_r,
- [0x5A] = z80_inst_unimplemented, // TODO
- [0x5B] = z80_inst_ld_dd_inn,
- [0x5C] = z80_inst_unimplemented, // TODO
- [0x5D] = z80_inst_retn,
- [0x5E] = z80_inst_im,
- [0x5F] = z80_inst_unimplemented, // TODO
- [0x60] = z80_inst_in_r_c,
- [0x61] = z80_inst_out_c_r,
- [0x62] = z80_inst_sbc_hl_ss,
- [0x63] = z80_inst_ld_nn_dd,
- [0x64] = z80_inst_unimplemented, // TODO
- [0x65] = z80_inst_retn,
- [0x66] = z80_inst_im,
- [0x67] = z80_inst_unimplemented, // TODO
- [0x68] = z80_inst_in_r_c,
- [0x69] = z80_inst_out_c_r,
- [0x6A] = z80_inst_unimplemented, // TODO
- [0x6B] = z80_inst_ld_dd_inn,
- [0x6C] = z80_inst_unimplemented, // TODO
- [0x6D] = z80_inst_retn,
- [0x6E] = z80_inst_im,
- [0x6F] = z80_inst_unimplemented, // TODO
- [0x70] = z80_inst_in_r_c,
- [0x71] = z80_inst_out_c_r,
- [0x72] = z80_inst_sbc_hl_ss,
- [0x73] = z80_inst_ld_nn_dd,
- [0x74] = z80_inst_unimplemented, // TODO
- [0x75] = z80_inst_retn,
- [0x76] = z80_inst_im,
- [0x77] = z80_inst_nop2,
- [0x78] = z80_inst_in_r_c,
- [0x79] = z80_inst_out_c_r,
- [0x7A] = z80_inst_unimplemented, // TODO
- [0x7B] = z80_inst_ld_dd_inn,
- [0x7C] = z80_inst_unimplemented, // TODO
- [0x7D] = z80_inst_retn,
- [0x7E] = z80_inst_im,
- [0x7F] = z80_inst_nop2,
- [0x80] = z80_inst_nop2,
- [0x81] = z80_inst_nop2,
- [0x82] = z80_inst_nop2,
- [0x83] = z80_inst_nop2,
- [0x84] = z80_inst_nop2,
- [0x85] = z80_inst_nop2,
- [0x86] = z80_inst_nop2,
- [0x87] = z80_inst_nop2,
- [0x88] = z80_inst_nop2,
- [0x89] = z80_inst_nop2,
- [0x8A] = z80_inst_nop2,
- [0x8B] = z80_inst_nop2,
- [0x8C] = z80_inst_nop2,
- [0x8D] = z80_inst_nop2,
- [0x8E] = z80_inst_nop2,
- [0x8F] = z80_inst_nop2,
- [0x90] = z80_inst_nop2,
- [0x91] = z80_inst_nop2,
- [0x92] = z80_inst_nop2,
- [0x93] = z80_inst_nop2,
- [0x94] = z80_inst_nop2,
- [0x95] = z80_inst_nop2,
- [0x96] = z80_inst_nop2,
- [0x97] = z80_inst_nop2,
- [0x98] = z80_inst_nop2,
- [0x99] = z80_inst_nop2,
- [0x9A] = z80_inst_nop2,
- [0x9B] = z80_inst_nop2,
- [0x9C] = z80_inst_nop2,
- [0x9D] = z80_inst_nop2,
- [0x9E] = z80_inst_nop2,
- [0x9F] = z80_inst_nop2,
- [0xA0] = z80_inst_ldi,
- [0xA1] = z80_inst_unimplemented, // TODO
- [0xA2] = z80_inst_ini,
- [0xA3] = z80_inst_outi,
- [0xA4] = z80_inst_nop2,
- [0xA5] = z80_inst_nop2,
- [0xA6] = z80_inst_nop2,
- [0xA7] = z80_inst_nop2,
- [0xA8] = z80_inst_ldd,
- [0xA9] = z80_inst_unimplemented, // TODO
- [0xAA] = z80_inst_ind,
- [0xAB] = z80_inst_outd,
- [0xAC] = z80_inst_nop2,
- [0xAD] = z80_inst_nop2,
- [0xAE] = z80_inst_nop2,
- [0xAF] = z80_inst_nop2,
- [0xB0] = z80_inst_ldir,
- [0xB1] = z80_inst_unimplemented, // TODO
- [0xB2] = z80_inst_inir,
- [0xB3] = z80_inst_otir,
- [0xB4] = z80_inst_nop2,
- [0xB5] = z80_inst_nop2,
- [0xB6] = z80_inst_nop2,
- [0xB7] = z80_inst_nop2,
- [0xB8] = z80_inst_lddr,
- [0xB9] = z80_inst_unimplemented, // TODO
- [0xBA] = z80_inst_indr,
- [0xBB] = z80_inst_otdr,
- [0xBC] = z80_inst_nop2,
- [0xBD] = z80_inst_nop2,
- [0xBE] = z80_inst_nop2,
- [0xBF] = z80_inst_nop2,
- [0xC0] = z80_inst_nop2,
- [0xC1] = z80_inst_nop2,
- [0xC2] = z80_inst_nop2,
- [0xC3] = z80_inst_nop2,
- [0xC4] = z80_inst_nop2,
- [0xC5] = z80_inst_nop2,
- [0xC6] = z80_inst_nop2,
- [0xC7] = z80_inst_nop2,
- [0xC8] = z80_inst_nop2,
- [0xC9] = z80_inst_nop2,
- [0xCA] = z80_inst_nop2,
- [0xCB] = z80_inst_nop2,
- [0xCC] = z80_inst_nop2,
- [0xCD] = z80_inst_nop2,
- [0xCE] = z80_inst_nop2,
- [0xCF] = z80_inst_nop2,
- [0xD0] = z80_inst_nop2,
- [0xD1] = z80_inst_nop2,
- [0xD2] = z80_inst_nop2,
- [0xD3] = z80_inst_nop2,
- [0xD4] = z80_inst_nop2,
- [0xD5] = z80_inst_nop2,
- [0xD6] = z80_inst_nop2,
- [0xD7] = z80_inst_nop2,
- [0xD8] = z80_inst_nop2,
- [0xD9] = z80_inst_nop2,
- [0xDA] = z80_inst_nop2,
- [0xDB] = z80_inst_nop2,
- [0xDC] = z80_inst_nop2,
- [0xDD] = z80_inst_nop2,
- [0xDE] = z80_inst_nop2,
- [0xDF] = z80_inst_nop2,
- [0xE0] = z80_inst_nop2,
- [0xE1] = z80_inst_nop2,
- [0xE2] = z80_inst_nop2,
- [0xE3] = z80_inst_nop2,
- [0xE4] = z80_inst_nop2,
- [0xE5] = z80_inst_nop2,
- [0xE6] = z80_inst_nop2,
- [0xE7] = z80_inst_nop2,
- [0xE8] = z80_inst_nop2,
- [0xE9] = z80_inst_nop2,
- [0xEA] = z80_inst_nop2,
- [0xEB] = z80_inst_nop2,
- [0xEC] = z80_inst_nop2,
- [0xED] = z80_inst_nop2,
- [0xEE] = z80_inst_nop2,
- [0xEF] = z80_inst_nop2,
- [0xF0] = z80_inst_nop2,
- [0xF1] = z80_inst_nop2,
- [0xF2] = z80_inst_nop2,
- [0xF3] = z80_inst_nop2,
- [0xF4] = z80_inst_nop2,
- [0xF5] = z80_inst_nop2,
- [0xF6] = z80_inst_nop2,
- [0xF7] = z80_inst_nop2,
- [0xF8] = z80_inst_nop2,
- [0xF9] = z80_inst_nop2,
- [0xFA] = z80_inst_nop2,
- [0xFB] = z80_inst_nop2,
- [0xFC] = z80_inst_nop2,
- [0xFD] = z80_inst_nop2,
- [0xFE] = z80_inst_nop2,
- [0xFF] = z80_inst_nop2
- };
-
- static DispatchTable instruction_table_bits = {
- [0x00] = z80_inst_unimplemented, // TODO
- [0x01] = z80_inst_unimplemented, // TODO
- [0x02] = z80_inst_unimplemented, // TODO
- [0x03] = z80_inst_unimplemented, // TODO
- [0x04] = z80_inst_unimplemented, // TODO
- [0x05] = z80_inst_unimplemented, // TODO
- [0x06] = z80_inst_unimplemented, // TODO
- [0x07] = z80_inst_unimplemented, // TODO
- [0x08] = z80_inst_unimplemented, // TODO
- [0x09] = z80_inst_unimplemented, // TODO
- [0x0A] = z80_inst_unimplemented, // TODO
- [0x0B] = z80_inst_unimplemented, // TODO
- [0x0C] = z80_inst_unimplemented, // TODO
- [0x0D] = z80_inst_unimplemented, // TODO
- [0x0E] = z80_inst_unimplemented, // TODO
- [0x0F] = z80_inst_unimplemented, // TODO
- [0x10] = z80_inst_unimplemented, // TODO
- [0x11] = z80_inst_unimplemented, // TODO
- [0x12] = z80_inst_unimplemented, // TODO
- [0x13] = z80_inst_unimplemented, // TODO
- [0x14] = z80_inst_unimplemented, // TODO
- [0x15] = z80_inst_unimplemented, // TODO
- [0x16] = z80_inst_unimplemented, // TODO
- [0x17] = z80_inst_unimplemented, // TODO
- [0x18] = z80_inst_unimplemented, // TODO
- [0x19] = z80_inst_unimplemented, // TODO
- [0x1A] = z80_inst_unimplemented, // TODO
- [0x1B] = z80_inst_unimplemented, // TODO
- [0x1C] = z80_inst_unimplemented, // TODO
- [0x1D] = z80_inst_unimplemented, // TODO
- [0x1E] = z80_inst_unimplemented, // TODO
- [0x1F] = z80_inst_unimplemented, // TODO
- [0x20] = z80_inst_unimplemented, // TODO
- [0x21] = z80_inst_unimplemented, // TODO
- [0x22] = z80_inst_unimplemented, // TODO
- [0x23] = z80_inst_unimplemented, // TODO
- [0x24] = z80_inst_unimplemented, // TODO
- [0x25] = z80_inst_unimplemented, // TODO
- [0x26] = z80_inst_unimplemented, // TODO
- [0x27] = z80_inst_unimplemented, // TODO
- [0x28] = z80_inst_unimplemented, // TODO
- [0x29] = z80_inst_unimplemented, // TODO
- [0x2A] = z80_inst_unimplemented, // TODO
- [0x2B] = z80_inst_unimplemented, // TODO
- [0x2C] = z80_inst_unimplemented, // TODO
- [0x2D] = z80_inst_unimplemented, // TODO
- [0x2E] = z80_inst_unimplemented, // TODO
- [0x2F] = z80_inst_unimplemented, // TODO
- [0x30] = z80_inst_unimplemented, // TODO
- [0x31] = z80_inst_unimplemented, // TODO
- [0x32] = z80_inst_unimplemented, // TODO
- [0x33] = z80_inst_unimplemented, // TODO
- [0x34] = z80_inst_unimplemented, // TODO
- [0x35] = z80_inst_unimplemented, // TODO
- [0x36] = z80_inst_unimplemented, // TODO
- [0x37] = z80_inst_unimplemented, // TODO
- [0x38] = z80_inst_unimplemented, // TODO
- [0x39] = z80_inst_unimplemented, // TODO
- [0x3A] = z80_inst_unimplemented, // TODO
- [0x3B] = z80_inst_unimplemented, // TODO
- [0x3C] = z80_inst_unimplemented, // TODO
- [0x3D] = z80_inst_unimplemented, // TODO
- [0x3E] = z80_inst_unimplemented, // TODO
- [0x3F] = z80_inst_unimplemented, // TODO
- [0x40] = z80_inst_bit_b_r,
- [0x41] = z80_inst_bit_b_r,
- [0x42] = z80_inst_bit_b_r,
- [0x43] = z80_inst_bit_b_r,
- [0x44] = z80_inst_bit_b_r,
- [0x45] = z80_inst_bit_b_r,
- [0x46] = z80_inst_bit_b_hl,
- [0x47] = z80_inst_bit_b_r,
- [0x48] = z80_inst_bit_b_r,
- [0x49] = z80_inst_bit_b_r,
- [0x4A] = z80_inst_bit_b_r,
- [0x4B] = z80_inst_bit_b_r,
- [0x4C] = z80_inst_bit_b_r,
- [0x4D] = z80_inst_bit_b_r,
- [0x4E] = z80_inst_bit_b_hl,
- [0x4F] = z80_inst_bit_b_r,
- [0x50] = z80_inst_bit_b_r,
- [0x51] = z80_inst_bit_b_r,
- [0x52] = z80_inst_bit_b_r,
- [0x53] = z80_inst_bit_b_r,
- [0x54] = z80_inst_bit_b_r,
- [0x55] = z80_inst_bit_b_r,
- [0x56] = z80_inst_bit_b_hl,
- [0x57] = z80_inst_bit_b_r,
- [0x58] = z80_inst_bit_b_r,
- [0x59] = z80_inst_bit_b_r,
- [0x5A] = z80_inst_bit_b_r,
- [0x5B] = z80_inst_bit_b_r,
- [0x5C] = z80_inst_bit_b_r,
- [0x5D] = z80_inst_bit_b_r,
- [0x5E] = z80_inst_bit_b_hl,
- [0x5F] = z80_inst_bit_b_r,
- [0x60] = z80_inst_bit_b_r,
- [0x61] = z80_inst_bit_b_r,
- [0x62] = z80_inst_bit_b_r,
- [0x63] = z80_inst_bit_b_r,
- [0x64] = z80_inst_bit_b_r,
- [0x65] = z80_inst_bit_b_r,
- [0x66] = z80_inst_bit_b_hl,
- [0x67] = z80_inst_bit_b_r,
- [0x68] = z80_inst_bit_b_r,
- [0x69] = z80_inst_bit_b_r,
- [0x6A] = z80_inst_bit_b_r,
- [0x6B] = z80_inst_bit_b_r,
- [0x6C] = z80_inst_bit_b_r,
- [0x6D] = z80_inst_bit_b_r,
- [0x6E] = z80_inst_bit_b_hl,
- [0x6F] = z80_inst_bit_b_r,
- [0x70] = z80_inst_bit_b_r,
- [0x71] = z80_inst_bit_b_r,
- [0x72] = z80_inst_bit_b_r,
- [0x73] = z80_inst_bit_b_r,
- [0x74] = z80_inst_bit_b_r,
- [0x75] = z80_inst_bit_b_r,
- [0x76] = z80_inst_bit_b_hl,
- [0x77] = z80_inst_bit_b_r,
- [0x78] = z80_inst_bit_b_r,
- [0x79] = z80_inst_bit_b_r,
- [0x7A] = z80_inst_bit_b_r,
- [0x7B] = z80_inst_bit_b_r,
- [0x7C] = z80_inst_bit_b_r,
- [0x7D] = z80_inst_bit_b_r,
- [0x7E] = z80_inst_bit_b_hl,
- [0x7F] = z80_inst_bit_b_r,
- [0x80] = z80_inst_unimplemented, // TODO
- [0x81] = z80_inst_unimplemented, // TODO
- [0x82] = z80_inst_unimplemented, // TODO
- [0x83] = z80_inst_unimplemented, // TODO
- [0x84] = z80_inst_unimplemented, // TODO
- [0x85] = z80_inst_unimplemented, // TODO
- [0x86] = z80_inst_res_b_hl,
- [0x87] = z80_inst_unimplemented, // TODO
- [0x88] = z80_inst_unimplemented, // TODO
- [0x89] = z80_inst_unimplemented, // TODO
- [0x8A] = z80_inst_unimplemented, // TODO
- [0x8B] = z80_inst_unimplemented, // TODO
- [0x8C] = z80_inst_unimplemented, // TODO
- [0x8D] = z80_inst_unimplemented, // TODO
- [0x8E] = z80_inst_res_b_hl,
- [0x8F] = z80_inst_unimplemented, // TODO
- [0x90] = z80_inst_unimplemented, // TODO
- [0x91] = z80_inst_unimplemented, // TODO
- [0x92] = z80_inst_unimplemented, // TODO
- [0x93] = z80_inst_unimplemented, // TODO
- [0x94] = z80_inst_unimplemented, // TODO
- [0x95] = z80_inst_unimplemented, // TODO
- [0x96] = z80_inst_res_b_hl,
- [0x97] = z80_inst_unimplemented, // TODO
- [0x98] = z80_inst_unimplemented, // TODO
- [0x99] = z80_inst_unimplemented, // TODO
- [0x9A] = z80_inst_unimplemented, // TODO
- [0x9B] = z80_inst_unimplemented, // TODO
- [0x9C] = z80_inst_unimplemented, // TODO
- [0x9D] = z80_inst_unimplemented, // TODO
- [0x9E] = z80_inst_res_b_hl,
- [0x9F] = z80_inst_unimplemented, // TODO
- [0xA0] = z80_inst_unimplemented, // TODO
- [0xA1] = z80_inst_unimplemented, // TODO
- [0xA2] = z80_inst_unimplemented, // TODO
- [0xA3] = z80_inst_unimplemented, // TODO
- [0xA4] = z80_inst_unimplemented, // TODO
- [0xA5] = z80_inst_unimplemented, // TODO
- [0xA6] = z80_inst_res_b_hl,
- [0xA7] = z80_inst_unimplemented, // TODO
- [0xA8] = z80_inst_unimplemented, // TODO
- [0xA9] = z80_inst_unimplemented, // TODO
- [0xAA] = z80_inst_unimplemented, // TODO
- [0xAB] = z80_inst_unimplemented, // TODO
- [0xAC] = z80_inst_unimplemented, // TODO
- [0xAD] = z80_inst_unimplemented, // TODO
- [0xAE] = z80_inst_res_b_hl,
- [0xAF] = z80_inst_unimplemented, // TODO
- [0xB0] = z80_inst_unimplemented, // TODO
- [0xB1] = z80_inst_unimplemented, // TODO
- [0xB2] = z80_inst_unimplemented, // TODO
- [0xB3] = z80_inst_unimplemented, // TODO
- [0xB4] = z80_inst_unimplemented, // TODO
- [0xB5] = z80_inst_unimplemented, // TODO
- [0xB6] = z80_inst_res_b_hl,
- [0xB7] = z80_inst_unimplemented, // TODO
- [0xB8] = z80_inst_unimplemented, // TODO
- [0xB9] = z80_inst_unimplemented, // TODO
- [0xBA] = z80_inst_unimplemented, // TODO
- [0xBB] = z80_inst_unimplemented, // TODO
- [0xBC] = z80_inst_unimplemented, // TODO
- [0xBD] = z80_inst_unimplemented, // TODO
- [0xBE] = z80_inst_res_b_hl,
- [0xBF] = z80_inst_unimplemented, // TODO
- [0xC0] = z80_inst_unimplemented, // TODO
- [0xC1] = z80_inst_unimplemented, // TODO
- [0xC2] = z80_inst_unimplemented, // TODO
- [0xC3] = z80_inst_unimplemented, // TODO
- [0xC4] = z80_inst_unimplemented, // TODO
- [0xC5] = z80_inst_unimplemented, // TODO
- [0xC6] = z80_inst_unimplemented, // TODO
- [0xC7] = z80_inst_unimplemented, // TODO
- [0xC8] = z80_inst_unimplemented, // TODO
- [0xC9] = z80_inst_unimplemented, // TODO
- [0xCA] = z80_inst_unimplemented, // TODO
- [0xCB] = z80_inst_unimplemented, // TODO
- [0xCC] = z80_inst_unimplemented, // TODO
- [0xCD] = z80_inst_unimplemented, // TODO
- [0xCE] = z80_inst_unimplemented, // TODO
- [0xCF] = z80_inst_unimplemented, // TODO
- [0xD0] = z80_inst_unimplemented, // TODO
- [0xD1] = z80_inst_unimplemented, // TODO
- [0xD2] = z80_inst_unimplemented, // TODO
- [0xD3] = z80_inst_unimplemented, // TODO
- [0xD4] = z80_inst_unimplemented, // TODO
- [0xD5] = z80_inst_unimplemented, // TODO
- [0xD6] = z80_inst_unimplemented, // TODO
- [0xD7] = z80_inst_unimplemented, // TODO
- [0xD8] = z80_inst_unimplemented, // TODO
- [0xD9] = z80_inst_unimplemented, // TODO
- [0xDA] = z80_inst_unimplemented, // TODO
- [0xDB] = z80_inst_unimplemented, // TODO
- [0xDC] = z80_inst_unimplemented, // TODO
- [0xDD] = z80_inst_unimplemented, // TODO
- [0xDE] = z80_inst_unimplemented, // TODO
- [0xDF] = z80_inst_unimplemented, // TODO
- [0xE0] = z80_inst_unimplemented, // TODO
- [0xE1] = z80_inst_unimplemented, // TODO
- [0xE2] = z80_inst_unimplemented, // TODO
- [0xE3] = z80_inst_unimplemented, // TODO
- [0xE4] = z80_inst_unimplemented, // TODO
- [0xE5] = z80_inst_unimplemented, // TODO
- [0xE6] = z80_inst_unimplemented, // TODO
- [0xE7] = z80_inst_unimplemented, // TODO
- [0xE8] = z80_inst_unimplemented, // TODO
- [0xE9] = z80_inst_unimplemented, // TODO
- [0xEA] = z80_inst_unimplemented, // TODO
- [0xEB] = z80_inst_unimplemented, // TODO
- [0xEC] = z80_inst_unimplemented, // TODO
- [0xED] = z80_inst_unimplemented, // TODO
- [0xEE] = z80_inst_unimplemented, // TODO
- [0xEF] = z80_inst_unimplemented, // TODO
- [0xF0] = z80_inst_unimplemented, // TODO
- [0xF1] = z80_inst_unimplemented, // TODO
- [0xF2] = z80_inst_unimplemented, // TODO
- [0xF3] = z80_inst_unimplemented, // TODO
- [0xF4] = z80_inst_unimplemented, // TODO
- [0xF5] = z80_inst_unimplemented, // TODO
- [0xF6] = z80_inst_unimplemented, // TODO
- [0xF7] = z80_inst_unimplemented, // TODO
- [0xF8] = z80_inst_unimplemented, // TODO
- [0xF9] = z80_inst_unimplemented, // TODO
- [0xFA] = z80_inst_unimplemented, // TODO
- [0xFB] = z80_inst_unimplemented, // TODO
- [0xFC] = z80_inst_unimplemented, // TODO
- [0xFD] = z80_inst_unimplemented, // TODO
- [0xFE] = z80_inst_unimplemented, // TODO
- [0xFF] = z80_inst_unimplemented // TODO
- };
-
- static DispatchTable instruction_table_index = {
- [0x00] = z80_inst_nop2,
- [0x01] = z80_inst_nop2,
- [0x02] = z80_inst_nop2,
- [0x03] = z80_inst_nop2,
- [0x04] = z80_inst_nop2,
- [0x05] = z80_inst_nop2,
- [0x06] = z80_inst_nop2,
- [0x07] = z80_inst_nop2,
- [0x08] = z80_inst_nop2,
- [0x09] = z80_inst_unimplemented, // TODO
- [0x0A] = z80_inst_nop2,
- [0x0B] = z80_inst_nop2,
- [0x0C] = z80_inst_nop2,
- [0x0D] = z80_inst_nop2,
- [0x0E] = z80_inst_nop2,
- [0x0F] = z80_inst_nop2,
- [0x10] = z80_inst_nop2,
- [0x11] = z80_inst_nop2,
- [0x12] = z80_inst_nop2,
- [0x13] = z80_inst_nop2,
- [0x14] = z80_inst_nop2,
- [0x15] = z80_inst_nop2,
- [0x16] = z80_inst_nop2,
- [0x17] = z80_inst_nop2,
- [0x18] = z80_inst_nop2,
- [0x19] = z80_inst_unimplemented, // TODO
- [0x1A] = z80_inst_nop2,
- [0x1B] = z80_inst_nop2,
- [0x1C] = z80_inst_nop2,
- [0x1D] = z80_inst_nop2,
- [0x1E] = z80_inst_nop2,
- [0x1F] = z80_inst_nop2,
- [0x20] = z80_inst_nop2,
- [0x21] = z80_inst_ld_ixy_nn,
- [0x22] = z80_inst_unimplemented, // TODO
- [0x23] = z80_inst_unimplemented, // TODO
- [0x24] = z80_inst_unimplemented, // TODO
- [0x25] = z80_inst_unimplemented, // TODO
- [0x26] = z80_inst_unimplemented, // TODO
- [0x27] = z80_inst_nop2,
- [0x28] = z80_inst_nop2,
- [0x29] = z80_inst_unimplemented, // TODO
- [0x2A] = z80_inst_unimplemented, // TODO
- [0x2B] = z80_inst_unimplemented, // TODO
- [0x2C] = z80_inst_unimplemented, // TODO
- [0x2D] = z80_inst_unimplemented, // TODO
- [0x2E] = z80_inst_unimplemented, // TODO
- [0x2F] = z80_inst_nop2,
- [0x30] = z80_inst_nop2,
- [0x31] = z80_inst_nop2,
- [0x32] = z80_inst_nop2,
- [0x33] = z80_inst_nop2,
- [0x34] = z80_inst_unimplemented, // TODO
- [0x35] = z80_inst_unimplemented, // TODO
- [0x36] = z80_inst_ld_ixy_n,
- [0x37] = z80_inst_nop2,
- [0x38] = z80_inst_nop2,
- [0x39] = z80_inst_unimplemented, // TODO
- [0x3A] = z80_inst_nop2,
- [0x3B] = z80_inst_nop2,
- [0x3C] = z80_inst_nop2,
- [0x3D] = z80_inst_nop2,
- [0x3E] = z80_inst_nop2,
- [0x3F] = z80_inst_nop2,
- [0x40] = z80_inst_nop2,
- [0x41] = z80_inst_nop2,
- [0x42] = z80_inst_nop2,
- [0x43] = z80_inst_nop2,
- [0x44] = z80_inst_unimplemented, // TODO
- [0x45] = z80_inst_unimplemented, // TODO
- [0x46] = z80_inst_ld_r_ixy,
- [0x47] = z80_inst_nop2,
- [0x48] = z80_inst_nop2,
- [0x49] = z80_inst_nop2,
- [0x4A] = z80_inst_nop2,
- [0x4B] = z80_inst_nop2,
- [0x4C] = z80_inst_unimplemented, // TODO
- [0x4D] = z80_inst_unimplemented, // TODO
- [0x4E] = z80_inst_ld_r_ixy,
- [0x4F] = z80_inst_nop2,
- [0x50] = z80_inst_nop2,
- [0x51] = z80_inst_nop2,
- [0x52] = z80_inst_nop2,
- [0x53] = z80_inst_nop2,
- [0x54] = z80_inst_unimplemented, // TODO
- [0x55] = z80_inst_unimplemented, // TODO
- [0x56] = z80_inst_ld_r_ixy,
- [0x57] = z80_inst_nop2,
- [0x58] = z80_inst_nop2,
- [0x59] = z80_inst_nop2,
- [0x5A] = z80_inst_nop2,
- [0x5B] = z80_inst_nop2,
- [0x5C] = z80_inst_unimplemented, // TODO
- [0x5D] = z80_inst_unimplemented, // TODO
- [0x5E] = z80_inst_ld_r_ixy,
- [0x5F] = z80_inst_nop2,
- [0x60] = z80_inst_unimplemented, // TODO
- [0x61] = z80_inst_unimplemented, // TODO
- [0x62] = z80_inst_unimplemented, // TODO
- [0x63] = z80_inst_unimplemented, // TODO
- [0x64] = z80_inst_unimplemented, // TODO
- [0x65] = z80_inst_unimplemented, // TODO
- [0x66] = z80_inst_ld_r_ixy,
- [0x67] = z80_inst_unimplemented, // TODO
- [0x68] = z80_inst_unimplemented, // TODO
- [0x69] = z80_inst_unimplemented, // TODO
- [0x6A] = z80_inst_unimplemented, // TODO
- [0x6B] = z80_inst_unimplemented, // TODO
- [0x6C] = z80_inst_unimplemented, // TODO
- [0x6D] = z80_inst_unimplemented, // TODO
- [0x6E] = z80_inst_ld_r_ixy,
- [0x6F] = z80_inst_unimplemented, // TODO
- [0x70] = z80_inst_ld_ixy_r,
- [0x71] = z80_inst_ld_ixy_r,
- [0x72] = z80_inst_ld_ixy_r,
- [0x73] = z80_inst_ld_ixy_r,
- [0x74] = z80_inst_ld_ixy_r,
- [0x75] = z80_inst_ld_ixy_r,
- [0x76] = z80_inst_nop2,
- [0x77] = z80_inst_ld_ixy_r,
- [0x78] = z80_inst_nop2,
- [0x79] = z80_inst_nop2,
- [0x7A] = z80_inst_nop2,
- [0x7B] = z80_inst_nop2,
- [0x7C] = z80_inst_unimplemented, // TODO
- [0x7D] = z80_inst_unimplemented, // TODO
- [0x7E] = z80_inst_ld_r_ixy,
- [0x7F] = z80_inst_nop2,
- [0x80] = z80_inst_nop2,
- [0x81] = z80_inst_nop2,
- [0x82] = z80_inst_nop2,
- [0x83] = z80_inst_nop2,
- [0x84] = z80_inst_unimplemented, // TODO
- [0x85] = z80_inst_unimplemented, // TODO
- [0x86] = z80_inst_unimplemented, // TODO
- [0x87] = z80_inst_nop2,
- [0x88] = z80_inst_nop2,
- [0x89] = z80_inst_nop2,
- [0x8A] = z80_inst_nop2,
- [0x8B] = z80_inst_nop2,
- [0x8C] = z80_inst_unimplemented, // TODO
- [0x8D] = z80_inst_unimplemented, // TODO
- [0x8E] = z80_inst_unimplemented, // TODO
- [0x8F] = z80_inst_nop2,
- [0x90] = z80_inst_nop2,
- [0x91] = z80_inst_nop2,
- [0x92] = z80_inst_nop2,
- [0x93] = z80_inst_nop2,
- [0x94] = z80_inst_unimplemented, // TODO
- [0x95] = z80_inst_unimplemented, // TODO
- [0x96] = z80_inst_unimplemented, // TODO
- [0x97] = z80_inst_nop2,
- [0x98] = z80_inst_nop2,
- [0x99] = z80_inst_nop2,
- [0x9A] = z80_inst_nop2,
- [0x9B] = z80_inst_nop2,
- [0x9C] = z80_inst_unimplemented, // TODO
- [0x9D] = z80_inst_unimplemented, // TODO
- [0x9E] = z80_inst_unimplemented, // TODO
- [0x9F] = z80_inst_nop2,
- [0xA0] = z80_inst_nop2,
- [0xA1] = z80_inst_nop2,
- [0xA2] = z80_inst_nop2,
- [0xA3] = z80_inst_nop2,
- [0xA4] = z80_inst_unimplemented, // TODO
- [0xA5] = z80_inst_unimplemented, // TODO
- [0xA6] = z80_inst_unimplemented, // TODO
- [0xA7] = z80_inst_nop2,
- [0xA8] = z80_inst_nop2,
- [0xA9] = z80_inst_nop2,
- [0xAA] = z80_inst_nop2,
- [0xAB] = z80_inst_nop2,
- [0xAC] = z80_inst_unimplemented, // TODO
- [0xAD] = z80_inst_unimplemented, // TODO
- [0xAE] = z80_inst_unimplemented, // TODO
- [0xAF] = z80_inst_nop2,
- [0xB0] = z80_inst_nop2,
- [0xB1] = z80_inst_nop2,
- [0xB2] = z80_inst_nop2,
- [0xB3] = z80_inst_nop2,
- [0xB4] = z80_inst_unimplemented, // TODO
- [0xB5] = z80_inst_unimplemented, // TODO
- [0xB6] = z80_inst_or_ixy,
- [0xB7] = z80_inst_nop2,
- [0xB8] = z80_inst_nop2,
- [0xB9] = z80_inst_nop2,
- [0xBA] = z80_inst_nop2,
- [0xBB] = z80_inst_nop2,
- [0xBC] = z80_inst_unimplemented, // TODO
- [0xBD] = z80_inst_unimplemented, // TODO
- [0xBE] = z80_inst_unimplemented, // TODO
- [0xBF] = z80_inst_nop2,
- [0xC0] = z80_inst_nop2,
- [0xC1] = z80_inst_nop2,
- [0xC2] = z80_inst_nop2,
- [0xC3] = z80_inst_nop2,
- [0xC4] = z80_inst_nop2,
- [0xC5] = z80_inst_nop2,
- [0xC6] = z80_inst_nop2,
- [0xC7] = z80_inst_nop2,
- [0xC8] = z80_inst_nop2,
- [0xC9] = z80_inst_nop2,
- [0xCA] = z80_inst_nop2,
- [0xCB] = z80_prefix_index_bits,
- [0xCC] = z80_inst_nop2,
- [0xCD] = z80_inst_nop2,
- [0xCE] = z80_inst_nop2,
- [0xCF] = z80_inst_nop2,
- [0xD0] = z80_inst_nop2,
- [0xD1] = z80_inst_nop2,
- [0xD2] = z80_inst_nop2,
- [0xD3] = z80_inst_nop2,
- [0xD4] = z80_inst_nop2,
- [0xD5] = z80_inst_nop2,
- [0xD6] = z80_inst_nop2,
- [0xD7] = z80_inst_nop2,
- [0xD8] = z80_inst_nop2,
- [0xD9] = z80_inst_nop2,
- [0xDA] = z80_inst_nop2,
- [0xDB] = z80_inst_nop2,
- [0xDC] = z80_inst_nop2,
- [0xDD] = z80_inst_nop2,
- [0xDE] = z80_inst_nop2,
- [0xDF] = z80_inst_nop2,
- [0xE0] = z80_inst_nop2,
- [0xE1] = z80_inst_pop_ixy,
- [0xE2] = z80_inst_nop2,
- [0xE3] = z80_inst_unimplemented, // TODO
- [0xE4] = z80_inst_nop2,
- [0xE5] = z80_inst_push_ixy,
- [0xE6] = z80_inst_nop2,
- [0xE7] = z80_inst_nop2,
- [0xE8] = z80_inst_nop2,
- [0xE9] = z80_inst_unimplemented, // TODO
- [0xEA] = z80_inst_nop2,
- [0xEB] = z80_inst_nop2,
- [0xEC] = z80_inst_nop2,
- [0xED] = z80_inst_nop2,
- [0xEE] = z80_inst_nop2,
- [0xEF] = z80_inst_nop2,
- [0xF0] = z80_inst_nop2,
- [0xF1] = z80_inst_nop2,
- [0xF2] = z80_inst_nop2,
- [0xF3] = z80_inst_nop2,
- [0xF4] = z80_inst_nop2,
- [0xF5] = z80_inst_nop2,
- [0xF6] = z80_inst_nop2,
- [0xF7] = z80_inst_nop2,
- [0xF8] = z80_inst_nop2,
- [0xF9] = z80_inst_unimplemented, // TODO
- [0xFA] = z80_inst_nop2,
- [0xFB] = z80_inst_nop2,
- [0xFC] = z80_inst_nop2,
- [0xFD] = z80_inst_nop2,
- [0xFE] = z80_inst_nop2,
- [0xFF] = z80_inst_nop2
- };
-
- static DispatchTable instruction_table_index_bits = {
- [0x00] = z80_inst_unimplemented, // TODO
- [0x01] = z80_inst_unimplemented, // TODO
- [0x02] = z80_inst_unimplemented, // TODO
- [0x03] = z80_inst_unimplemented, // TODO
- [0x04] = z80_inst_unimplemented, // TODO
- [0x05] = z80_inst_unimplemented, // TODO
- [0x06] = z80_inst_unimplemented, // TODO
- [0x07] = z80_inst_unimplemented, // TODO
- [0x08] = z80_inst_unimplemented, // TODO
- [0x09] = z80_inst_unimplemented, // TODO
- [0x0A] = z80_inst_unimplemented, // TODO
- [0x0B] = z80_inst_unimplemented, // TODO
- [0x0C] = z80_inst_unimplemented, // TODO
- [0x0D] = z80_inst_unimplemented, // TODO
- [0x0E] = z80_inst_unimplemented, // TODO
- [0x0F] = z80_inst_unimplemented, // TODO
- [0x10] = z80_inst_unimplemented, // TODO
- [0x11] = z80_inst_unimplemented, // TODO
- [0x12] = z80_inst_unimplemented, // TODO
- [0x13] = z80_inst_unimplemented, // TODO
- [0x14] = z80_inst_unimplemented, // TODO
- [0x15] = z80_inst_unimplemented, // TODO
- [0x16] = z80_inst_unimplemented, // TODO
- [0x17] = z80_inst_unimplemented, // TODO
- [0x18] = z80_inst_unimplemented, // TODO
- [0x19] = z80_inst_unimplemented, // TODO
- [0x1A] = z80_inst_unimplemented, // TODO
- [0x1B] = z80_inst_unimplemented, // TODO
- [0x1C] = z80_inst_unimplemented, // TODO
- [0x1D] = z80_inst_unimplemented, // TODO
- [0x1E] = z80_inst_unimplemented, // TODO
- [0x1F] = z80_inst_unimplemented, // TODO
- [0x20] = z80_inst_unimplemented, // TODO
- [0x21] = z80_inst_unimplemented, // TODO
- [0x22] = z80_inst_unimplemented, // TODO
- [0x23] = z80_inst_unimplemented, // TODO
- [0x24] = z80_inst_unimplemented, // TODO
- [0x25] = z80_inst_unimplemented, // TODO
- [0x26] = z80_inst_unimplemented, // TODO
- [0x27] = z80_inst_unimplemented, // TODO
- [0x28] = z80_inst_unimplemented, // TODO
- [0x29] = z80_inst_unimplemented, // TODO
- [0x2A] = z80_inst_unimplemented, // TODO
- [0x2B] = z80_inst_unimplemented, // TODO
- [0x2C] = z80_inst_unimplemented, // TODO
- [0x2D] = z80_inst_unimplemented, // TODO
- [0x2E] = z80_inst_unimplemented, // TODO
- [0x2F] = z80_inst_unimplemented, // TODO
- [0x30] = z80_inst_unimplemented, // TODO
- [0x31] = z80_inst_unimplemented, // TODO
- [0x32] = z80_inst_unimplemented, // TODO
- [0x33] = z80_inst_unimplemented, // TODO
- [0x34] = z80_inst_unimplemented, // TODO
- [0x35] = z80_inst_unimplemented, // TODO
- [0x36] = z80_inst_unimplemented, // TODO
- [0x37] = z80_inst_unimplemented, // TODO
- [0x38] = z80_inst_unimplemented, // TODO
- [0x39] = z80_inst_unimplemented, // TODO
- [0x3A] = z80_inst_unimplemented, // TODO
- [0x3B] = z80_inst_unimplemented, // TODO
- [0x3C] = z80_inst_unimplemented, // TODO
- [0x3D] = z80_inst_unimplemented, // TODO
- [0x3E] = z80_inst_unimplemented, // TODO
- [0x3F] = z80_inst_unimplemented, // TODO
- [0x40] = z80_inst_bit_b_ixy,
- [0x41] = z80_inst_bit_b_ixy,
- [0x42] = z80_inst_bit_b_ixy,
- [0x43] = z80_inst_bit_b_ixy,
- [0x44] = z80_inst_bit_b_ixy,
- [0x45] = z80_inst_bit_b_ixy,
- [0x46] = z80_inst_bit_b_ixy,
- [0x47] = z80_inst_bit_b_ixy,
- [0x48] = z80_inst_bit_b_ixy,
- [0x49] = z80_inst_bit_b_ixy,
- [0x4A] = z80_inst_bit_b_ixy,
- [0x4B] = z80_inst_bit_b_ixy,
- [0x4C] = z80_inst_bit_b_ixy,
- [0x4D] = z80_inst_bit_b_ixy,
- [0x4E] = z80_inst_bit_b_ixy,
- [0x4F] = z80_inst_bit_b_ixy,
- [0x50] = z80_inst_bit_b_ixy,
- [0x51] = z80_inst_bit_b_ixy,
- [0x52] = z80_inst_bit_b_ixy,
- [0x53] = z80_inst_bit_b_ixy,
- [0x54] = z80_inst_bit_b_ixy,
- [0x55] = z80_inst_bit_b_ixy,
- [0x56] = z80_inst_bit_b_ixy,
- [0x57] = z80_inst_bit_b_ixy,
- [0x58] = z80_inst_bit_b_ixy,
- [0x59] = z80_inst_bit_b_ixy,
- [0x5A] = z80_inst_bit_b_ixy,
- [0x5B] = z80_inst_bit_b_ixy,
- [0x5C] = z80_inst_bit_b_ixy,
- [0x5D] = z80_inst_bit_b_ixy,
- [0x5E] = z80_inst_bit_b_ixy,
- [0x5F] = z80_inst_bit_b_ixy,
- [0x60] = z80_inst_bit_b_ixy,
- [0x61] = z80_inst_bit_b_ixy,
- [0x62] = z80_inst_bit_b_ixy,
- [0x63] = z80_inst_bit_b_ixy,
- [0x64] = z80_inst_bit_b_ixy,
- [0x65] = z80_inst_bit_b_ixy,
- [0x66] = z80_inst_bit_b_ixy,
- [0x67] = z80_inst_bit_b_ixy,
- [0x68] = z80_inst_bit_b_ixy,
- [0x69] = z80_inst_bit_b_ixy,
- [0x6A] = z80_inst_bit_b_ixy,
- [0x6B] = z80_inst_bit_b_ixy,
- [0x6C] = z80_inst_bit_b_ixy,
- [0x6D] = z80_inst_bit_b_ixy,
- [0x6E] = z80_inst_bit_b_ixy,
- [0x6F] = z80_inst_bit_b_ixy,
- [0x70] = z80_inst_bit_b_ixy,
- [0x71] = z80_inst_bit_b_ixy,
- [0x72] = z80_inst_bit_b_ixy,
- [0x73] = z80_inst_bit_b_ixy,
- [0x74] = z80_inst_bit_b_ixy,
- [0x75] = z80_inst_bit_b_ixy,
- [0x76] = z80_inst_bit_b_ixy,
- [0x77] = z80_inst_bit_b_ixy,
- [0x78] = z80_inst_bit_b_ixy,
- [0x79] = z80_inst_bit_b_ixy,
- [0x7A] = z80_inst_bit_b_ixy,
- [0x7B] = z80_inst_bit_b_ixy,
- [0x7C] = z80_inst_bit_b_ixy,
- [0x7D] = z80_inst_bit_b_ixy,
- [0x7E] = z80_inst_bit_b_ixy,
- [0x7F] = z80_inst_bit_b_ixy,
- [0x80] = z80_inst_unimplemented, // TODO
- [0x81] = z80_inst_unimplemented, // TODO
- [0x82] = z80_inst_unimplemented, // TODO
- [0x83] = z80_inst_unimplemented, // TODO
- [0x84] = z80_inst_unimplemented, // TODO
- [0x85] = z80_inst_unimplemented, // TODO
- [0x86] = z80_inst_unimplemented, // TODO
- [0x87] = z80_inst_unimplemented, // TODO
- [0x88] = z80_inst_unimplemented, // TODO
- [0x89] = z80_inst_unimplemented, // TODO
- [0x8A] = z80_inst_unimplemented, // TODO
- [0x8B] = z80_inst_unimplemented, // TODO
- [0x8C] = z80_inst_unimplemented, // TODO
- [0x8D] = z80_inst_unimplemented, // TODO
- [0x8E] = z80_inst_unimplemented, // TODO
- [0x8F] = z80_inst_unimplemented, // TODO
- [0x90] = z80_inst_unimplemented, // TODO
- [0x91] = z80_inst_unimplemented, // TODO
- [0x92] = z80_inst_unimplemented, // TODO
- [0x93] = z80_inst_unimplemented, // TODO
- [0x94] = z80_inst_unimplemented, // TODO
- [0x95] = z80_inst_unimplemented, // TODO
- [0x96] = z80_inst_unimplemented, // TODO
- [0x97] = z80_inst_unimplemented, // TODO
- [0x98] = z80_inst_unimplemented, // TODO
- [0x99] = z80_inst_unimplemented, // TODO
- [0x9A] = z80_inst_unimplemented, // TODO
- [0x9B] = z80_inst_unimplemented, // TODO
- [0x9C] = z80_inst_unimplemented, // TODO
- [0x9D] = z80_inst_unimplemented, // TODO
- [0x9E] = z80_inst_unimplemented, // TODO
- [0x9F] = z80_inst_unimplemented, // TODO
- [0xA0] = z80_inst_unimplemented, // TODO
- [0xA1] = z80_inst_unimplemented, // TODO
- [0xA2] = z80_inst_unimplemented, // TODO
- [0xA3] = z80_inst_unimplemented, // TODO
- [0xA4] = z80_inst_unimplemented, // TODO
- [0xA5] = z80_inst_unimplemented, // TODO
- [0xA6] = z80_inst_unimplemented, // TODO
- [0xA7] = z80_inst_unimplemented, // TODO
- [0xA8] = z80_inst_unimplemented, // TODO
- [0xA9] = z80_inst_unimplemented, // TODO
- [0xAA] = z80_inst_unimplemented, // TODO
- [0xAB] = z80_inst_unimplemented, // TODO
- [0xAC] = z80_inst_unimplemented, // TODO
- [0xAD] = z80_inst_unimplemented, // TODO
- [0xAE] = z80_inst_unimplemented, // TODO
- [0xAF] = z80_inst_unimplemented, // TODO
- [0xB0] = z80_inst_unimplemented, // TODO
- [0xB1] = z80_inst_unimplemented, // TODO
- [0xB2] = z80_inst_unimplemented, // TODO
- [0xB3] = z80_inst_unimplemented, // TODO
- [0xB4] = z80_inst_unimplemented, // TODO
- [0xB5] = z80_inst_unimplemented, // TODO
- [0xB6] = z80_inst_unimplemented, // TODO
- [0xB7] = z80_inst_unimplemented, // TODO
- [0xB8] = z80_inst_unimplemented, // TODO
- [0xB9] = z80_inst_unimplemented, // TODO
- [0xBA] = z80_inst_unimplemented, // TODO
- [0xBB] = z80_inst_unimplemented, // TODO
- [0xBC] = z80_inst_unimplemented, // TODO
- [0xBD] = z80_inst_unimplemented, // TODO
- [0xBE] = z80_inst_unimplemented, // TODO
- [0xBF] = z80_inst_unimplemented, // TODO
- [0xC0] = z80_inst_unimplemented, // TODO
- [0xC1] = z80_inst_unimplemented, // TODO
- [0xC2] = z80_inst_unimplemented, // TODO
- [0xC3] = z80_inst_unimplemented, // TODO
- [0xC4] = z80_inst_unimplemented, // TODO
- [0xC5] = z80_inst_unimplemented, // TODO
- [0xC6] = z80_inst_unimplemented, // TODO
- [0xC7] = z80_inst_unimplemented, // TODO
- [0xC8] = z80_inst_unimplemented, // TODO
- [0xC9] = z80_inst_unimplemented, // TODO
- [0xCA] = z80_inst_unimplemented, // TODO
- [0xCB] = z80_inst_unimplemented, // TODO
- [0xCC] = z80_inst_unimplemented, // TODO
- [0xCD] = z80_inst_unimplemented, // TODO
- [0xCE] = z80_inst_unimplemented, // TODO
- [0xCF] = z80_inst_unimplemented, // TODO
- [0xD0] = z80_inst_unimplemented, // TODO
- [0xD1] = z80_inst_unimplemented, // TODO
- [0xD2] = z80_inst_unimplemented, // TODO
- [0xD3] = z80_inst_unimplemented, // TODO
- [0xD4] = z80_inst_unimplemented, // TODO
- [0xD5] = z80_inst_unimplemented, // TODO
- [0xD6] = z80_inst_unimplemented, // TODO
- [0xD7] = z80_inst_unimplemented, // TODO
- [0xD8] = z80_inst_unimplemented, // TODO
- [0xD9] = z80_inst_unimplemented, // TODO
- [0xDA] = z80_inst_unimplemented, // TODO
- [0xDB] = z80_inst_unimplemented, // TODO
- [0xDC] = z80_inst_unimplemented, // TODO
- [0xDD] = z80_inst_unimplemented, // TODO
- [0xDE] = z80_inst_unimplemented, // TODO
- [0xDF] = z80_inst_unimplemented, // TODO
- [0xE0] = z80_inst_unimplemented, // TODO
- [0xE1] = z80_inst_unimplemented, // TODO
- [0xE2] = z80_inst_unimplemented, // TODO
- [0xE3] = z80_inst_unimplemented, // TODO
- [0xE4] = z80_inst_unimplemented, // TODO
- [0xE5] = z80_inst_unimplemented, // TODO
- [0xE6] = z80_inst_unimplemented, // TODO
- [0xE7] = z80_inst_unimplemented, // TODO
- [0xE8] = z80_inst_unimplemented, // TODO
- [0xE9] = z80_inst_unimplemented, // TODO
- [0xEA] = z80_inst_unimplemented, // TODO
- [0xEB] = z80_inst_unimplemented, // TODO
- [0xEC] = z80_inst_unimplemented, // TODO
- [0xED] = z80_inst_unimplemented, // TODO
- [0xEE] = z80_inst_unimplemented, // TODO
- [0xEF] = z80_inst_unimplemented, // TODO
- [0xF0] = z80_inst_unimplemented, // TODO
- [0xF1] = z80_inst_unimplemented, // TODO
- [0xF2] = z80_inst_unimplemented, // TODO
- [0xF3] = z80_inst_unimplemented, // TODO
- [0xF4] = z80_inst_unimplemented, // TODO
- [0xF5] = z80_inst_unimplemented, // TODO
- [0xF6] = z80_inst_unimplemented, // TODO
- [0xF7] = z80_inst_unimplemented, // TODO
- [0xF8] = z80_inst_unimplemented, // TODO
- [0xF9] = z80_inst_unimplemented, // TODO
- [0xFA] = z80_inst_unimplemented, // TODO
- [0xFB] = z80_inst_unimplemented, // TODO
- [0xFC] = z80_inst_unimplemented, // TODO
- [0xFD] = z80_inst_unimplemented, // TODO
- [0xFE] = z80_inst_unimplemented, // TODO
- [0xFF] = z80_inst_unimplemented // TODO
- };
|