|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297 |
- /* 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_unimplemented, // TODO
- [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_unimplemented, // TODO
- [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_unimplemented, // TODO
- [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_unimplemented, // TODO
- [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_unimplemented, // TODO
- [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_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
- };
-
- 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_unimplemented, // TODO
- [0x41] = z80_inst_unimplemented, // TODO
- [0x42] = z80_inst_unimplemented, // TODO
- [0x43] = z80_inst_unimplemented, // TODO
- [0x44] = z80_inst_unimplemented, // TODO
- [0x45] = z80_inst_unimplemented, // TODO
- [0x46] = z80_inst_unimplemented, // TODO
- [0x47] = z80_inst_unimplemented, // TODO
- [0x48] = z80_inst_unimplemented, // TODO
- [0x49] = z80_inst_unimplemented, // TODO
- [0x4A] = z80_inst_unimplemented, // TODO
- [0x4B] = z80_inst_unimplemented, // TODO
- [0x4C] = z80_inst_unimplemented, // TODO
- [0x4D] = z80_inst_unimplemented, // TODO
- [0x4E] = z80_inst_unimplemented, // TODO
- [0x4F] = z80_inst_unimplemented, // TODO
- [0x50] = z80_inst_unimplemented, // TODO
- [0x51] = z80_inst_unimplemented, // TODO
- [0x52] = z80_inst_unimplemented, // TODO
- [0x53] = z80_inst_unimplemented, // TODO
- [0x54] = z80_inst_unimplemented, // TODO
- [0x55] = z80_inst_unimplemented, // TODO
- [0x56] = z80_inst_unimplemented, // TODO
- [0x57] = z80_inst_unimplemented, // TODO
- [0x58] = z80_inst_unimplemented, // TODO
- [0x59] = z80_inst_unimplemented, // TODO
- [0x5A] = z80_inst_unimplemented, // TODO
- [0x5B] = z80_inst_unimplemented, // TODO
- [0x5C] = z80_inst_unimplemented, // TODO
- [0x5D] = z80_inst_unimplemented, // TODO
- [0x5E] = z80_inst_unimplemented, // TODO
- [0x5F] = z80_inst_unimplemented, // TODO
- [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_unimplemented, // TODO
- [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_unimplemented, // TODO
- [0x6F] = z80_inst_unimplemented, // TODO
- [0x70] = z80_inst_unimplemented, // TODO
- [0x71] = z80_inst_unimplemented, // TODO
- [0x72] = z80_inst_unimplemented, // TODO
- [0x73] = z80_inst_unimplemented, // TODO
- [0x74] = z80_inst_unimplemented, // TODO
- [0x75] = z80_inst_unimplemented, // TODO
- [0x76] = z80_inst_unimplemented, // TODO
- [0x77] = z80_inst_unimplemented, // TODO
- [0x78] = z80_inst_unimplemented, // TODO
- [0x79] = z80_inst_unimplemented, // TODO
- [0x7A] = z80_inst_unimplemented, // TODO
- [0x7B] = z80_inst_unimplemented, // TODO
- [0x7C] = z80_inst_unimplemented, // TODO
- [0x7D] = z80_inst_unimplemented, // TODO
- [0x7E] = z80_inst_unimplemented, // TODO
- [0x7F] = z80_inst_unimplemented, // TODO
- [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
- };
|