z80da.py 97 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129
  1. # z80jit - Z80 CPU emulator [with JIT compilation?], in rpython.
  2. # Copyright (C) 2014-2017 Jason Harris <jth@mibot.com>
  3. # This program is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 3 of the License, or
  6. # (at your option) any later version.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program. If not, see <http://www.gnu.org/licenses/>
  13. #-----------------------------------------------------------------------------
  14. """
  15. Z80 Disassembler
  16. """
  17. #-----------------------------------------------------------------------------
  18. _r = ('b', 'c', 'd', 'e', 'h', 'l', '(hl)', 'a')
  19. _rp = ('bc', 'de', 'hl', 'sp')
  20. _rp2 = ('bc', 'de', 'hl', 'af')
  21. _cc = ('nz', 'z', 'nc', 'c', 'po', 'pe', 'p', 'm')
  22. _alu = ('add', 'adc', 'sub', 'sbc', 'and', 'xor', 'or', 'cp')
  23. _alux = ('a,', 'a,', '', 'a,', '', '', '', '')
  24. _rot = ('rlc', 'rrc', 'rl', 'rr', 'sla', 'sra', 'sll', 'srl')
  25. _rota = ('rlca', 'rrca', 'rla', 'rra', 'daa', 'cpl', 'scf', 'ccf')
  26. _im = ('0', '0', '1', '2', '0', '0', '1', '2')
  27. _bli = (
  28. ('ldi', 'ldd', 'ldir', 'lddr'), ('cpi', 'cpd', 'cpir', 'cpdr'),
  29. ('ini', 'ind', 'inir', 'indr'), ('outi', 'outd', 'otir', 'otdr')
  30. )
  31. #-----------------------------------------------------------------------------
  32. def _da_normal(mem, pc):
  33. """
  34. Normal decode with no prefixes
  35. """
  36. m0 = mem[pc]
  37. m1 = mem[pc + 1]
  38. m2 = mem[pc + 2]
  39. x = (m0 >> 6) & 3
  40. y = (m0 >> 3) & 7
  41. z = (m0 >> 0) & 7
  42. p = (m0 >> 4) & 3
  43. q = (m0 >> 3) & 1
  44. n = m1
  45. nn = (m2 << 8) + m1
  46. d = m1
  47. if d & 0x80:
  48. d = (d & 0x7f) - 128
  49. d = (pc + d + 2) & 0xffff
  50. if x == 0:
  51. if z == 0:
  52. if y == 0:
  53. return ('nop', '', 1)
  54. elif y == 1:
  55. return ('ex', 'af,af\'', 1)
  56. elif y == 2:
  57. return ('djnz', '%04x' % d, 2)
  58. elif y == 3:
  59. return ('jr', '%04x' % d, 2)
  60. else:
  61. return ('jr', '%s,%04x' % (_cc[y - 4], d), 2)
  62. elif z == 1:
  63. if q == 0:
  64. return ('ld', '%s,%04x' % (_rp[p], nn), 3)
  65. elif q == 1:
  66. return ('add', 'hl,%s' % _rp[p], 1)
  67. elif z == 2:
  68. if q == 0:
  69. if p == 0:
  70. return ('ld', '(bc),a', 1)
  71. elif p == 1:
  72. return ('ld', '(de),a', 1)
  73. elif p == 2:
  74. return ('ld', '(%04x),hl' % nn, 3)
  75. else:
  76. return ('ld', '(%04x),a' % nn, 3)
  77. else:
  78. if p == 0:
  79. return ('ld', 'a,(bc)', 1)
  80. elif p == 1:
  81. return ('ld', 'a,(de)', 1)
  82. elif p == 2:
  83. return ('ld', 'hl,(%04x)' % nn, 3)
  84. else:
  85. return ('ld', 'a,(%04x)' % nn, 3)
  86. elif z == 3:
  87. if q == 0:
  88. return ('inc', _rp[p], 1)
  89. else:
  90. return ('dec', _rp[p], 1)
  91. elif z == 4:
  92. return ('inc', _r[y], 1)
  93. elif z == 5:
  94. return ('dec', _r[y], 1)
  95. elif z == 6:
  96. return ('ld', '%s,%02x' % (_r[y], n), 2)
  97. else:
  98. return (_rota[y], '', 1)
  99. elif x == 1:
  100. if (z == 6) and (y == 6):
  101. return ('halt', '', 1)
  102. else:
  103. return ('ld', '%s,%s' % (_r[y], _r[z]), 1)
  104. elif x == 2:
  105. return (_alu[y], '%s%s' % (_alux[y], _r[z]), 1)
  106. else:
  107. if z == 0:
  108. return ('ret', _cc[y], 1)
  109. elif z == 1:
  110. if q == 0:
  111. return ('pop', _rp2[p], 1)
  112. else:
  113. if p == 0:
  114. return ('ret', '', 1)
  115. elif p == 1:
  116. return ('exx', '', 1)
  117. elif p == 2:
  118. return ('jp', 'hl', 1)
  119. else:
  120. return ('ld', 'sp,hl', 1)
  121. elif z == 2:
  122. return ('jp', '%s,%04x' % (_cc[y], nn), 3)
  123. elif z == 3:
  124. if y == 0:
  125. return ('jp', '%04x' % nn, 3)
  126. elif y == 2:
  127. return ('out', '(%02x),a' % n, 2)
  128. elif y == 3:
  129. return ('in', 'a,(%02x)' % n, 2)
  130. elif y == 4:
  131. return ('ex', '(sp),hl', 1)
  132. elif y == 5:
  133. return ('ex', 'de,hl', 1)
  134. elif y == 6:
  135. return ('di', '', 1)
  136. else:
  137. return ('ei', '', 1)
  138. elif z == 4:
  139. return ('call', '%s,%04x' % (_cc[y], nn), 3)
  140. elif z == 5:
  141. if q == 0:
  142. return ('push', _rp2[p], 1)
  143. else:
  144. if p == 0:
  145. return ('call', '%04x' % nn, 3)
  146. elif z == 6:
  147. return (_alu[y], '%s%02x' % (_alux[y], n), 2)
  148. else:
  149. return ('rst', '%02x' % (y << 3), 1)
  150. #-----------------------------------------------------------------------------
  151. def _da_index(mem, pc, ir):
  152. """
  153. Decode with index register substitutions
  154. """
  155. m0 = mem[pc]
  156. m1 = mem[pc + 1]
  157. m2 = mem[pc + 2]
  158. x = (m0 >> 6) & 3
  159. y = (m0 >> 3) & 7
  160. z = (m0 >> 0) & 7
  161. p = (m0 >> 4) & 3
  162. q = (m0 >> 3) & 1
  163. n0 = m1
  164. n1 = m2
  165. nn = (m2 << 8) + m1
  166. d = m1
  167. if d & 0x80:
  168. d = (d & 0x7f) - 128
  169. sign = ('', '+')[d >= 0]
  170. dj = (pc + d + 2) & 0xffff
  171. # if using (hl) then: (hl)->(ix+d), h and l are unaffected.
  172. alt0_r = list(_r)
  173. alt0_r[6] = '(%s%s%02x)' % (ir, sign, d)
  174. # if not using (hl) then: hl->ix, h->ixh, l->ixl
  175. alt1_r = list(_r)
  176. alt1_r[4] = '%sh' % ir
  177. alt1_r[5] = '%sl' % ir
  178. alt_rp = list(_rp)
  179. alt_rp[2] = ir
  180. alt_rp2 = list(_rp2)
  181. alt_rp2[2] = ir
  182. if x == 0:
  183. if z == 0:
  184. if y == 0:
  185. return ('nop', '', 2)
  186. elif y == 1:
  187. return ('ex', 'af,af\'', 2)
  188. elif y == 2:
  189. return ('djnz', '%04x' % dj, 3)
  190. elif y == 3:
  191. return ('jr', '%04x' % dj, 3)
  192. else:
  193. return ('jr', '%s,%04x' % (_cc[y - 4], dj), 3)
  194. elif z == 1:
  195. if q == 0:
  196. return ('ld', '%s,%04x' % (alt_rp[p], nn), 4)
  197. elif q == 1:
  198. return ('add', '%s,%s' % (ir, alt_rp[p]), 2)
  199. elif z == 2:
  200. if q == 0:
  201. if p == 0:
  202. return ('ld', '(bc),a', 2)
  203. elif p == 1:
  204. return ('ld', '(de),a', 2)
  205. elif p == 2:
  206. return ('ld', '(%04x),%s' % (nn, ir), 4)
  207. else:
  208. return ('ld', '(%04x),a' % nn, 4)
  209. else:
  210. if p == 0:
  211. return ('ld', 'a,(bc)', 2)
  212. elif p == 1:
  213. return ('ld', 'a,(de)', 2)
  214. elif p == 2:
  215. return ('ld', '%s,(%04x)' % (ir, nn), 4)
  216. else:
  217. return ('ld', 'a,(%04x)' % nn, 4)
  218. elif z == 3:
  219. if q == 0:
  220. return ('inc', alt_rp[p], 2)
  221. else:
  222. return ('dec', alt_rp[p], 2)
  223. elif z == 4:
  224. if y == 6:
  225. return ('inc', alt0_r[y], 3)
  226. else:
  227. return ('inc', alt1_r[y], 2)
  228. elif z == 5:
  229. if y == 6:
  230. return ('dec', alt0_r[y], 3)
  231. else:
  232. return ('dec', alt1_r[y], 2)
  233. elif z == 6:
  234. if y == 6:
  235. return ('ld', '%s,%02x' % (alt0_r[y], n1), 4)
  236. else:
  237. return ('ld', '%s,%02x' % (alt1_r[y], n0), 3)
  238. else:
  239. return (_rota[y], '', 2)
  240. elif x == 1:
  241. if (z == 6) and (y == 6):
  242. return ('halt', '', 2)
  243. else:
  244. if (y == 6) or (z == 6):
  245. return ('ld', '%s,%s' % (alt0_r[y], alt0_r[z]), 3)
  246. else:
  247. return ('ld', '%s,%s' % (alt1_r[y], alt1_r[z]), 2)
  248. elif x == 2:
  249. if z == 6:
  250. return (_alu[y], '%s%s' % (_alux[y], alt0_r[z]), 3)
  251. else:
  252. return (_alu[y], '%s%s' % (_alux[y], alt1_r[z]), 2)
  253. else:
  254. if z == 0:
  255. return ('ret', _cc[y], 2)
  256. elif z == 1:
  257. if q == 0:
  258. return ('pop', alt_rp2[p], 2)
  259. else:
  260. if p == 0:
  261. return ('ret', '', 2)
  262. elif p == 1:
  263. return ('exx', '', 2)
  264. elif p == 2:
  265. return ('jp', ir, 2)
  266. else:
  267. return ('ld', 'sp,%s' % ir, 2)
  268. elif z == 2:
  269. return ('jp', '%s,%04x' % (_cc[y], nn), 4)
  270. elif z == 3:
  271. if y == 0:
  272. return ('jp', '%04x' % nn, 4)
  273. elif y == 2:
  274. return ('out', '(%02x),a' % n0, 3)
  275. elif y == 3:
  276. return ('in', 'a,(%02x)' % n0, 3)
  277. elif y == 4:
  278. return ('ex', '(sp),%s' % ir, 2)
  279. elif y == 5:
  280. return ('ex', 'de,hl', 2)
  281. elif y == 6:
  282. return ('di', '', 2)
  283. else:
  284. return ('ei', '', 2)
  285. elif z == 4:
  286. return ('call', '%s,%04x' % (_cc[y], nn), 4)
  287. elif z == 5:
  288. if q == 0:
  289. return ('push', alt_rp2[p], 2)
  290. else:
  291. if p == 0:
  292. return ('call', '%04x' % nn, 4)
  293. elif z == 6:
  294. return (_alu[y], '%s%02x' % (_alux[y], n0), 3)
  295. else:
  296. return ('rst', '%02x' % (y << 3), 2)
  297. #-----------------------------------------------------------------------------
  298. def _da_cb_prefix(mem, pc):
  299. """
  300. 0xCB <opcode>
  301. """
  302. m0 = mem[pc]
  303. x = (m0 >> 6) & 3
  304. y = (m0 >> 3) & 7
  305. z = (m0 >> 0) & 7
  306. if x == 0:
  307. return (_rot[y], _r[z], 2)
  308. elif x == 1:
  309. return ('bit', '%d,%s' % (y, _r[z]), 2)
  310. elif x == 2:
  311. return ('res', '%d,%s' % (y, _r[z]), 2)
  312. else:
  313. return ('set', '%d,%s' % (y, _r[z]), 2)
  314. #-----------------------------------------------------------------------------
  315. def _da_ddcb_fdcb_prefix(mem, pc, ir):
  316. """
  317. 0xDDCB <d> <opcode>
  318. 0xFDCB <d> <opcode>
  319. """
  320. m0 = mem[pc]
  321. m1 = mem[pc + 1]
  322. x = (m1 >> 6) & 3
  323. y = (m1 >> 3) & 7
  324. z = (m1 >> 0) & 7
  325. d = m0
  326. if d & 0x80:
  327. d = (d & 0x7f) - 128
  328. sign = ('', '+')[d >= 0]
  329. if x == 0:
  330. if z == 6:
  331. return(_rot[y], '(%s%s%02x)' % (ir, sign, d), 4)
  332. else:
  333. return(_rot[y], '(%s%s%02x),%s' % (ir, sign, d, _r[z]), 4)
  334. elif x == 1:
  335. return ('bit', '%d,(%s%s%02x)' % (y, ir, sign, d), 4)
  336. elif x == 2:
  337. if z == 6:
  338. return ('res', '%d,(%s%s%02x)' % (y, ir, sign, d), 4)
  339. else:
  340. return ('res', '%d,(%s%s%02x),%s' % (y, ir, sign, d, _r[z]), 4)
  341. else:
  342. if z == 6:
  343. return ('set', '%d,(%s%s%02x)' % (y, ir, sign, d), 4)
  344. else:
  345. return ('set', '%d,(%s%s%02x),%s' % (y, ir, sign, d, _r[z]), 4)
  346. #-----------------------------------------------------------------------------
  347. def _da_ed_prefix(mem, pc):
  348. """
  349. 0xED <opcode>
  350. 0xED <opcode> <nn>
  351. """
  352. m0 = mem[pc]
  353. m1 = mem[pc + 1]
  354. m2 = mem[pc + 2]
  355. x = (m0 >> 6) & 3
  356. y = (m0 >> 3) & 7
  357. z = (m0 >> 0) & 7
  358. p = (m0 >> 4) & 3
  359. q = (m0 >> 3) & 1
  360. nn = (m2 << 8) + m1
  361. if x == 1:
  362. if z == 0:
  363. if y == 6:
  364. return ('in', '(c)', 2)
  365. else:
  366. return ('in', '%s,(c)' % _r[y], 2)
  367. elif z == 1:
  368. if y == 6:
  369. return ('out', '(c)', 2)
  370. else:
  371. return ('out', '(c),%s' % _r[y], 2)
  372. elif z == 2:
  373. if q == 0:
  374. return ('sbc', 'hl,%s' % _rp[p], 2)
  375. else:
  376. return ('adc', 'hl,%s' % _rp[p], 2)
  377. elif z == 3:
  378. if q == 0:
  379. return ('ld', '(%04x),%s' % (nn, _rp[p]), 4)
  380. else:
  381. return ('ld', '%s,(%04x)' % (_rp[p], nn), 4)
  382. elif z == 4:
  383. return ('neg', '', 2)
  384. elif z == 5:
  385. if y == 1:
  386. return ('reti', '', 2)
  387. else:
  388. return ('retn', '', 2)
  389. elif z == 6:
  390. return ('im', _im[y], 2)
  391. else:
  392. if y == 0:
  393. return ('ld', 'i,a', 2)
  394. elif y == 1:
  395. return ('ld', 'r,a', 2)
  396. elif y == 2:
  397. return ('ld', 'a,i', 2)
  398. elif y == 3:
  399. return ('ld', 'a,r', 2)
  400. elif y == 4:
  401. return ('rrd', '', 2)
  402. elif y == 5:
  403. return ('rld', '', 2)
  404. else:
  405. return ('nop', '', 2)
  406. elif x == 2:
  407. if (z <= 3) and (y >= 4):
  408. return (_bli[z][y - 4], '', 2)
  409. return ('nop', '', 2)
  410. #-----------------------------------------------------------------------------
  411. def _da_dd_fd_prefix(mem, pc, ir):
  412. """
  413. 0xDD <x>
  414. 0xFD <x>
  415. """
  416. m0 = mem[pc]
  417. if m0 in (0xdd, 0xed, 0xfd):
  418. return ('nop', '', 1)
  419. elif m0 == 0xcb:
  420. return _da_ddcb_fdcb_prefix(mem, pc + 1, ir)
  421. else:
  422. return _da_index(mem, pc, ir)
  423. #-----------------------------------------------------------------------------
  424. def disassemble(mem, pc):
  425. """
  426. Disassemble z80 opcodes starting at mem[pc].
  427. Return an (operation, operands, nbytes) tuple.
  428. """
  429. m0 = mem[pc]
  430. if m0 == 0xcb:
  431. return _da_cb_prefix(mem, pc + 1)
  432. elif m0 == 0xdd:
  433. return _da_dd_fd_prefix(mem, pc + 1, 'ix')
  434. elif m0 == 0xed:
  435. return _da_ed_prefix(mem, pc + 1)
  436. elif m0 == 0xfd:
  437. return _da_dd_fd_prefix(mem, pc + 1, 'iy')
  438. else:
  439. return _da_normal(mem, pc)
  440. #-----------------------------------------------------------------------------
  441. # unit tests
  442. import unittest
  443. import memory
  444. class _da_unit_tests(unittest.TestCase):
  445. def test_disassembler(self):
  446. tests = (
  447. # documented opcodes
  448. ((((1<<6)|(0<<3)|0),), ('ld', 'b,b')),
  449. ((((1<<6)|(0<<3)|1),), ('ld', 'b,c')),
  450. ((((1<<6)|(0<<3)|2),), ('ld', 'b,d')),
  451. ((((1<<6)|(0<<3)|3),), ('ld', 'b,e')),
  452. ((((1<<6)|(0<<3)|4),), ('ld', 'b,h')),
  453. ((((1<<6)|(0<<3)|5),), ('ld', 'b,l')),
  454. ((((1<<6)|(0<<3)|7),), ('ld', 'b,a')),
  455. ((((1<<6)|(1<<3)|7),), ('ld', 'c,a')),
  456. ((((1<<6)|(2<<3)|2),), ('ld', 'd,d')),
  457. #((0xdd, 0x52), ('ld', 'd,d')),
  458. #((0xfd, 0x52), ('ld', 'd,d')),
  459. ((((0<<6)|(0<<3)|6), 0x00), ('ld', 'b,00')),
  460. ((((0<<6)|(7<<3)|6), 0xab), ('ld', 'a,ab')),
  461. ((((1<<6)|(7<<3)|6),), ('ld', 'a,(hl)')),
  462. ((0xdd, ((1<<6)|(0<<3)|6), 0x00), ('ld', 'b,(ix+00)')),
  463. ((0xdd, ((1<<6)|(0<<3)|6), 0x80), ('ld', 'b,(ix-80)')),
  464. ((0xdd, ((1<<6)|(7<<3)|6), 0x82), ('ld', 'a,(ix-7e)')),
  465. ((0xfd, ((1<<6)|(0<<3)|6), 0x00), ('ld', 'b,(iy+00)')),
  466. ((0xfd, ((1<<6)|(0<<3)|6), 0x80), ('ld', 'b,(iy-80)')),
  467. ((0xfd, ((1<<6)|(7<<3)|6), 0x82), ('ld', 'a,(iy-7e)')),
  468. ((0xfd, ((1<<6)|(6<<3)|6), 0x00), ('halt', '', 2)),
  469. ((0xdd, ((1<<6)|(6<<3)|6), 0x00), ('halt', '', 2)),
  470. ((((1<<6)|(6<<3)|0),), ('ld', '(hl),b')),
  471. ((0xdd, ((1<<6)|(6<<3)|0), 0x00), ('ld', '(ix+00),b')),
  472. ((0xfd, ((1<<6)|(6<<3)|0), 0x00), ('ld', '(iy+00),b')),
  473. ((((0<<6)|(6<<3)|6), 0x00), ('ld', '(hl),00')),
  474. ((((0<<6)|(6<<3)|6), 0xff), ('ld', '(hl),ff')),
  475. ((0xdd, ((0<<6)|(6<<3)|6), 0x00, 0xaa), ('ld', '(ix+00),aa')),
  476. ((0xdd, ((0<<6)|(6<<3)|6), 0x80, 0xbb), ('ld', '(ix-80),bb')),
  477. ((0xfd, ((0<<6)|(6<<3)|6), 0x00, 0xcc), ('ld', '(iy+00),cc')),
  478. ((0xfd, ((0<<6)|(6<<3)|6), 0x80, 0xdd), ('ld', '(iy-80),dd')),
  479. ((((0<<6)|(1<<3)|2),), ('ld', 'a,(bc)')),
  480. ((((0<<6)|(3<<3)|2),), ('ld', 'a,(de)')),
  481. ((((0<<6)|(7<<3)|2), 0x00, 0x00), ('ld', 'a,(0000)')),
  482. ((((0<<6)|(7<<3)|2), 0x12, 0x34), ('ld', 'a,(3412)')),
  483. ((((0<<6)|(0<<3)|2),), ('ld', '(bc),a')),
  484. ((((0<<6)|(2<<3)|2),), ('ld', '(de),a')),
  485. ((((0<<6)|(6<<3)|2), 0xab, 0xcd), ('ld', '(cdab),a')),
  486. ((0xed, ((1<<6)|(2<<3)|7)), ('ld', 'a,i')),
  487. ((0xed, ((1<<6)|(3<<3)|7)), ('ld', 'a,r')),
  488. ((0xed, ((1<<6)|(0<<3)|7)), ('ld', 'i,a')),
  489. ((0xed, ((1<<6)|(1<<3)|7)), ('ld', 'r,a')),
  490. ((((0<<6)|(0<<3)|1), 0x00, 0x00), ('ld', 'bc,0000')),
  491. ((((0<<6)|(2<<3)|1), 0x00, 0x00), ('ld', 'de,0000')),
  492. ((((0<<6)|(4<<3)|1), 0x00, 0x00), ('ld', 'hl,0000')),
  493. ((((0<<6)|(6<<3)|1), 0x00, 0x00), ('ld', 'sp,0000')),
  494. ((((0<<6)|(6<<3)|1), 0x12, 0x34), ('ld', 'sp,3412')),
  495. ((0xdd, ((0<<6)|(4<<3)|1), 0x00, 0x00), ('ld', 'ix,0000')),
  496. ((0xdd, ((0<<6)|(4<<3)|1), 0x12, 0x34), ('ld', 'ix,3412')),
  497. ((0xfd, ((0<<6)|(4<<3)|1), 0xab, 0xcd), ('ld', 'iy,cdab')),
  498. ((((0<<6)|(5<<3)|2), 0x12, 0x34), ('ld', 'hl,(3412)')),
  499. ((0xed, ((1<<6)|(1<<3)|3), 0x12, 0x34), ('ld', 'bc,(3412)')),
  500. ((0xed, ((1<<6)|(3<<3)|3), 0x12, 0x34), ('ld', 'de,(3412)')),
  501. ((0xdd, ((0<<6)|(5<<3)|2), 0x12, 0x34), ('ld', 'ix,(3412)')),
  502. ((0xfd, ((0<<6)|(5<<3)|2), 0x12, 0x34), ('ld', 'iy,(3412)')),
  503. ((((0 << 6)|(4<<3)|2), 0x12, 0x34), ('ld', '(3412),hl')),
  504. ((0xed, ((1<<6)|(0<<3)|3), 0x12, 0x34), ('ld', '(3412),bc')),
  505. ((0xed, ((1<<6)|(6<<3)|3), 0x12, 0x34), ('ld', '(3412),sp')),
  506. ((0xdd, ((0<<6)|(4<<3)|2), 0x12, 0x34), ('ld', '(3412),ix')),
  507. ((0xfd, ((0<<6)|(4<<3)|2), 0x12, 0x34), ('ld', '(3412),iy')),
  508. ((((3<<6)|(7<<3)|1),), ('ld', 'sp,hl')),
  509. ((0xdd, ((3<<6)|(7<<3)|1)), ('ld', 'sp,ix')),
  510. ((0xfd, ((3<<6)|(7<<3)|1)), ('ld', 'sp,iy')),
  511. ((((3<<6)|(0<<3)|5),), ('push', 'bc')),
  512. ((((3<<6)|(2<<3)|5),), ('push', 'de')),
  513. ((((3<<6)|(4<<3)|5),), ('push', 'hl')),
  514. ((((3<<6)|(6<<3)|5),), ('push', 'af')),
  515. ((0xdd, ((3<<6)|(4<<3)|5)), ('push', 'ix')),
  516. ((0xfd, ((3<<6)|(4<<3)|5)), ('push', 'iy')),
  517. ((((3<<6)|(0<<3)|1),), ('pop', 'bc')),
  518. ((0xdd, ((3<<6)|(4<<3)|1)), ('pop', 'ix')),
  519. ((0xfd, ((3<<6)|(4<<3)|1)), ('pop', 'iy')),
  520. ((0xeb,), ('ex', 'de,hl')),
  521. ((0xdd, 0xeb,), ('ex', 'de,hl')),
  522. ((0xfd, 0xeb,), ('ex', 'de,hl')),
  523. ((0x08,), ('ex', 'af,af\'')),
  524. ((0xd9,), ('exx', '')),
  525. ((0xe3,), ('ex', '(sp),hl')),
  526. ((0xdd, 0xe3), ('ex', '(sp),ix')),
  527. ((0xfd, 0xe3), ('ex', '(sp),iy')),
  528. ((0xed, 0xa0), ('ldi', '')),
  529. ((0xed, 0xb0), ('ldir', '')),
  530. ((0xed, 0xa8), ('ldd', '')),
  531. ((0xed, 0xb8), ('lddr', '')),
  532. ((0xed, 0xa1), ('cpi', '')),
  533. ((0xed, 0xb1), ('cpir', '')),
  534. ((0xed, 0xa9), ('cpd', '')),
  535. ((0xed, 0xb9), ('cpdr', '')),
  536. ((((2<<6)|(0<<3)|0),), ('add', 'a,b')),
  537. ((0xc6, 0x00), ('add', 'a,00')),
  538. ((0x86,), ('add', 'a,(hl)')),
  539. ((0xdd, 0x86, 0x00), ('add', 'a,(ix+00)')),
  540. ((0xfd, 0x86, 0x00), ('add', 'a,(iy+00)')),
  541. ((((2<<6)|(1<<3)|0),), ('adc', 'a,b')),
  542. ((0xce, 0x00), ('adc', 'a,00')),
  543. ((0x8e,), ('adc', 'a,(hl)')),
  544. ((0xdd, 0x8e, 0x00), ('adc', 'a,(ix+00)')),
  545. ((0xfd, 0x8e, 0x00), ('adc', 'a,(iy+00)')),
  546. ((((2<<6)|(2<<3)|0),), ('sub', 'b')),
  547. ((0xd6, 0x00), ('sub', '00')),
  548. ((0x96,), ('sub', '(hl)')),
  549. ((0xdd, 0x96, 0x00), ('sub', '(ix+00)')),
  550. ((0xfd, 0x96, 0x00), ('sub', '(iy+00)')),
  551. ((((2<<6)|(3<<3)|0),), ('sbc', 'a,b')),
  552. ((0xde, 0x00), ('sbc', 'a,00')),
  553. ((0x9e,), ('sbc', 'a,(hl)')),
  554. ((0xdd, 0x9e, 0x00), ('sbc', 'a,(ix+00)')),
  555. ((0xfd, 0x9e, 0x00), ('sbc', 'a,(iy+00)')),
  556. ((((2<<6)|(4<<3)|0),), ('and', 'b')),
  557. ((0xe6, 0x00), ('and', '00')),
  558. ((0xa6,), ('and', '(hl)')),
  559. ((0xdd, 0xa6, 0x00), ('and', '(ix+00)')),
  560. ((0xfd, 0xa6, 0x00), ('and', '(iy+00)')),
  561. ((((2<<6)|(6<<3)|0),), ('or', 'b')),
  562. ((0xf6, 0x00), ('or', '00')),
  563. ((0xb6,), ('or', '(hl)')),
  564. ((0xdd, 0xb6, 0x00), ('or', '(ix+00)')),
  565. ((0xfd, 0xb6, 0x00), ('or', '(iy+00)')),
  566. ((((2<<6)|(5<<3)|0),), ('xor', 'b')),
  567. ((0xee, 0x00), ('xor', '00')),
  568. ((0xae,), ('xor', '(hl)')),
  569. ((0xdd, 0xae, 0x00), ('xor', '(ix+00)')),
  570. ((0xfd, 0xae, 0x00), ('xor', '(iy+00)')),
  571. ((((2<<6)|(7<<3)|0),), ('cp', 'b')),
  572. ((0xfe, 0x00), ('cp', '00')),
  573. ((0xbe,), ('cp', '(hl)')),
  574. ((0xdd, 0xbe, 0x00), ('cp', '(ix+00)')),
  575. ((0xfd, 0xbe, 0x00), ('cp', '(iy+00)')),
  576. ((((0<<6)|(0<<3)|4),), ('inc', 'b')),
  577. ((0x34,), ('inc', '(hl)')),
  578. ((0xdd, 0x34, 0x00), ('inc', '(ix+00)')),
  579. ((0xfd, 0x34, 0x00), ('inc', '(iy+00)')),
  580. ((((0<<6)|(0<<3)|5),), ('dec', 'b')),
  581. ((0x35,), ('dec', '(hl)')),
  582. ((0xdd, 0x35, 0x00), ('dec', '(ix+00)')),
  583. ((0xfd, 0x35, 0x00), ('dec', '(iy+00)')),
  584. ((0x27,), ('daa', '')),
  585. ((0x2f,), ('cpl', '')),
  586. ((0xed, 0x44), ('neg', '')),
  587. ((0x3f,), ('ccf', '')),
  588. ((0x37,), ('scf', '')),
  589. ((0x00,), ('nop', '')),
  590. ((0x76,), ('halt', '')),
  591. ((0xf3,), ('di', '')),
  592. ((0xfb,), ('ei', '')),
  593. ((0xed, 0x46), ('im', '0')),
  594. ((0xed, 0x56), ('im', '1')),
  595. ((0xed, 0x5e), ('im', '2')),
  596. ((((0<<6)|(1<<3)|1),), ('add', 'hl,bc')),
  597. ((0xed, ((1<<6)|(1<<3)|2)), ('adc', 'hl,bc')),
  598. ((0xed, ((1<<6)|(0<<3)|2)), ('sbc', 'hl,bc')),
  599. ((0xdd, ((0<<6)|(1<<3)|1)), ('add', 'ix,bc')),
  600. ((0xdd, ((0<<6)|(5<<3)|1)), ('add', 'ix,ix')),
  601. ((0xfd, ((0<<6)|(1<<3)|1)), ('add', 'iy,bc')),
  602. ((0xfd, ((0<<6)|(5<<3)|1)), ('add', 'iy,iy')),
  603. ((((0<<6)|(0<<3)|3),), ('inc', 'bc')),
  604. ((0xdd, ((0<<6)|(4<<3)|3)), ('inc', 'ix')),
  605. ((0xfd, ((0<<6)|(4<<3)|3)), ('inc', 'iy')),
  606. ((((0<<6)|(1<<3)|3),), ('dec', 'bc')),
  607. ((0xdd, ((0<<6)|(5<<3)|3),), ('dec', 'ix')),
  608. ((0xfd, ((0<<6)|(5<<3)|3),), ('dec', 'iy')),
  609. ((0x07,), ('rlca', '')),
  610. ((0x17,), ('rla', '')),
  611. ((0x0f,), ('rrca', '')),
  612. ((0x1f,), ('rra', '')),
  613. ((0xcb, 0x00), ('rlc', 'b')),
  614. ((0xcb, 0x06), ('rlc', '(hl)')),
  615. ((0xdd, 0xcb, 0x00, 0x06), ('rlc', '(ix+00)')),
  616. ((0xfd, 0xcb, 0x00, 0x06), ('rlc', '(iy+00)')),
  617. ((0xcb, ((0<<6)|(2<<3)|5)), ('rl', 'l')),
  618. ((0xcb, 0x16), ('rl', '(hl)')),
  619. ((0xdd, 0xcb, 0x12, 0x16), ('rl', '(ix+12)')),
  620. ((0xfd, 0xcb, 0x34, 0x16), ('rl', '(iy+34)')),
  621. ((0xcb, ((0<<6)|(1<<3)|5)), ('rrc', 'l')),
  622. ((0xcb, 0x0e), ('rrc', '(hl)')),
  623. ((0xdd, 0xcb, 0x12, 0x0e), ('rrc', '(ix+12)')),
  624. ((0xfd, 0xcb, 0x34, 0x0e), ('rrc', '(iy+34)')),
  625. ((0xcb, ((0<<6)|(3<<3)|5)), ('rr', 'l')),
  626. ((0xcb, 0x1e), ('rr', '(hl)')),
  627. ((0xdd, 0xcb, 0x12, 0x1e), ('rr', '(ix+12)')),
  628. ((0xfd, 0xcb, 0x34, 0x1e), ('rr', '(iy+34)')),
  629. ((0xcb, ((0<<6)|(4<<3)|5)), ('sla', 'l')),
  630. ((0xcb, 0x26), ('sla', '(hl)')),
  631. ((0xdd, 0xcb, 0x12, 0x26), ('sla', '(ix+12)')),
  632. ((0xfd, 0xcb, 0x34, 0x26), ('sla', '(iy+34)')),
  633. ((0xcb, ((0<<6)|(5<<3)|5)), ('sra', 'l')),
  634. ((0xcb, 0x2e), ('sra', '(hl)')),
  635. ((0xdd, 0xcb, 0x12, 0x2e), ('sra', '(ix+12)')),
  636. ((0xfd, 0xcb, 0x34, 0x2e), ('sra', '(iy+34)')),
  637. ((0xcb, ((0<<6)|(7<<3)|5)), ('srl', 'l')),
  638. ((0xcb, 0x3e), ('srl', '(hl)')),
  639. ((0xdd, 0xcb, 0x12, 0x3e), ('srl', '(ix+12)')),
  640. ((0xfd, 0xcb, 0x34, 0x3e), ('srl', '(iy+34)')),
  641. ((0xed, 0x6f), ('rld', '')),
  642. ((0xed, 0x67), ('rrd', '')),
  643. ((0xcb, ((1<<6)|(0<<3)|0)), ('bit', '0,b')),
  644. ((0xcb, ((1<<6)|(5<<3)|1)), ('bit', '5,c')),
  645. ((0xcb, ((1<<6)|(5<<3)|6)), ('bit', '5,(hl)')),
  646. ((0xdd, 0xcb, 0x56, ((1 << 6)|(5<<3)|6)), ('bit', '5,(ix+56)')),
  647. ((0xfd, 0xcb, 0x56, ((1 << 6)|(5<<3)|6)), ('bit', '5,(iy+56)')),
  648. ((0xcb, ((3<<6)|(0<<3)|0)), ('set', '0,b')),
  649. ((0xcb, ((3<<6)|(0<<3)|6)), ('set', '0,(hl)')),
  650. ((0xdd, 0xcb, 0x89, ((3<<6)|(0<<3)|6)), ('set', '0,(ix-77)')),
  651. ((0xfd, 0xcb, 0x89, ((3<<6)|(0<<3)|6)), ('set', '0,(iy-77)')),
  652. ((0xcb, ((2<<6)|(0<<3)|0)), ('res', '0,b')),
  653. ((0xcb, ((2<<6)|(0<<3)|6)), ('res', '0,(hl)')),
  654. ((0xdd, 0xcb, 0x89, ((2<<6)|(0<<3)|6)), ('res', '0,(ix-77)')),
  655. ((0xfd, 0xcb, 0x89, ((2<<6)|(0<<3)|6)), ('res', '0,(iy-77)')),
  656. ((0xc3, 0x12, 0x34), ('jp', '3412')),
  657. ((((3<<6)|(0<<3)|2), 0xab, 0xcd), ('jp', 'nz,cdab')),
  658. ((((3<<6)|(1<<3)|2), 0xab, 0xcd), ('jp', 'z,cdab')),
  659. ((((3<<6)|(2<<3)|2), 0xab, 0xcd), ('jp', 'nc,cdab')),
  660. ((((3<<6)|(3<<3)|2), 0xab, 0xcd), ('jp', 'c,cdab')),
  661. ((((3<<6)|(4<<3)|2), 0xab, 0xcd), ('jp', 'po,cdab')),
  662. ((((3<<6)|(5<<3)|2), 0xab, 0xcd), ('jp', 'pe,cdab')),
  663. ((((3<<6)|(6<<3)|2), 0xab, 0xcd), ('jp', 'p,cdab')),
  664. ((((3<<6)|(7<<3)|2), 0xab, 0xcd), ('jp', 'm,cdab')),
  665. ((0x18, 0x12), ('jr', '0014')),
  666. ((0x38, 0x12), ('jr', 'c,0014')),
  667. ((0x30, 0x12), ('jr', 'nc,0014')),
  668. ((0x28, 0x12), ('jr', 'z,0014')),
  669. ((0x20, 0x12), ('jr', 'nz,0014')),
  670. ((0xe9,), ('jp', 'hl')),
  671. ((0xdd, 0xe9,), ('jp', 'ix')),
  672. ((0xfd, 0xe9,), ('jp', 'iy')),
  673. ((0x10, 0x12), ('djnz', '0014')),
  674. ((0xcd, 0x12, 0x34), ('call', '3412')),
  675. ((((3<<6)|(4<<3)|4), 0xab, 0xcd), ('call', 'po,cdab')),
  676. ((0xc9,), ('ret', '')),
  677. ((((3<<6)|(0<<3)|0),), ('ret', 'nz')),
  678. ((0xed, 0x4d,), ('reti', '')),
  679. ((0xed, 0x45,), ('retn', '')),
  680. ((((3<<6)|(5<<3)|7),), ('rst', '28')),
  681. ((0xdb, 0x12), ('in', 'a,(12)')),
  682. ((0xed, ((1<<6)|(0<<3)|0)), ('in', 'b,(c)')),
  683. ((0xed, 0xa2,), ('ini', '')),
  684. ((0xed, 0xb2,), ('inir', '')),
  685. ((0xed, 0xaa,), ('ind', '')),
  686. ((0xed, 0xba,), ('indr', '')),
  687. ((0xd3, 0x12), ('out', '(12),a')),
  688. ((0xed, ((1<<6)|(0<<3)|1)), ('out', '(c),b')),
  689. ((0xed, 0xa3,), ('outi', '')),
  690. ((0xed, 0xb3,), ('otir', '')),
  691. ((0xed, 0xab,), ('outd', '')),
  692. ((0xed, 0xbb,), ('otdr', '')),
  693. # undocumented Opcodes
  694. ((0xcb, 0x30), ('sll', 'b')),
  695. ((0xcb, 0x31), ('sll', 'c')),
  696. ((0xcb, 0x32), ('sll', 'd')),
  697. ((0xcb, 0x33), ('sll', 'e')),
  698. ((0xcb, 0x34), ('sll', 'h')),
  699. ((0xcb, 0x35), ('sll', 'l')),
  700. ((0xcb, 0x36), ('sll', '(hl)')),
  701. ((0xcb, 0x37), ('sll', 'a')),
  702. ((0xed, 0x40), ('in', 'b,(c)')),
  703. ((0xed, 0x41), ('out', '(c),b')),
  704. ((0xed, 0x42), ('sbc', 'hl,bc')),
  705. ((0xed, 0x43, 0xab, 0xcd), ('ld', '(cdab),bc')),
  706. ((0xed, 0x44), ('neg', '')),
  707. ((0xed, 0x45), ('retn', '')),
  708. ((0xed, 0x46), ('im', '0')),
  709. ((0xed, 0x47), ('ld', 'i,a')),
  710. ((0xed, 0x48), ('in', 'c,(c)')),
  711. ((0xed, 0x49), ('out', '(c),c')),
  712. ((0xed, 0x4a), ('adc', 'hl,bc')),
  713. ((0xed, 0x4b, 0xab, 0xcd), ('ld', 'bc,(cdab)')),
  714. ((0xed, 0x4c), ('neg', '')),
  715. ((0xed, 0x4d), ('reti', '')),
  716. ((0xed, 0x4e), ('im', '0')),
  717. ((0xed, 0x4f), ('ld', 'r,a')),
  718. ((0xed, 0x50), ('in', 'd,(c)')),
  719. ((0xed, 0x51), ('out', '(c),d')),
  720. ((0xed, 0x52), ('sbc', 'hl,de')),
  721. ((0xed, 0x53, 0x12, 0x34), ('ld', '(3412),de')),
  722. ((0xed, 0x54), ('neg', '')),
  723. ((0xed, 0x55), ('retn', '')),
  724. ((0xed, 0x56), ('im', '1')),
  725. ((0xed, 0x57), ('ld', 'a,i')),
  726. ((0xed, 0x58), ('in', 'e,(c)')),
  727. ((0xed, 0x59), ('out', '(c),e')),
  728. ((0xed, 0x5a), ('adc', 'hl,de')),
  729. ((0xed, 0x5b, 0x12, 0x34), ('ld', 'de,(3412)')),
  730. ((0xed, 0x5c), ('neg', '')),
  731. ((0xed, 0x5d), ('retn', '')),
  732. ((0xed, 0x5e), ('im', '2')),
  733. ((0xed, 0x5f), ('ld', 'a,r')),
  734. ((0xed, 0x60), ('in', 'h,(c)')),
  735. ((0xed, 0x61), ('out', '(c),h')),
  736. ((0xed, 0x62), ('sbc', 'hl,hl')),
  737. ((0xed, 0x63, 0x12, 0x34), ('ld', '(3412),hl')),
  738. ((0xed, 0x64), ('neg', '')),
  739. ((0xed, 0x65), ('retn', '')),
  740. ((0xed, 0x66), ('im', '0')),
  741. ((0xed, 0x67), ('rrd', '')),
  742. ((0xed, 0x68), ('in', 'l,(c)')),
  743. ((0xed, 0x69), ('out', '(c),l')),
  744. ((0xed, 0x6a), ('adc', 'hl,hl')),
  745. ((0xed, 0x6b, 0xab, 0xcd), ('ld', 'hl,(cdab)')),
  746. ((0xed, 0x6c), ('neg', '')),
  747. ((0xed, 0x6d), ('retn', '')),
  748. ((0xed, 0x6e), ('im', '0')),
  749. ((0xed, 0x6f), ('rld', '')),
  750. ((0xed, 0x70), ('in', '(c)')),
  751. ((0xed, 0x71), ('out', '(c)')),
  752. ((0xed, 0x72), ('sbc', 'hl,sp')),
  753. ((0xed, 0x73, 0x45, 0x67), ('ld', '(6745),sp')),
  754. ((0xed, 0x74), ('neg', '')),
  755. ((0xed, 0x75), ('retn', '')),
  756. ((0xed, 0x76), ('im', '1')),
  757. ((0xed, 0x77), ('nop', '')),
  758. ((0xed, 0x78), ('in', 'a,(c)')),
  759. ((0xed, 0x79), ('out', '(c),a')),
  760. ((0xed, 0x7a), ('adc', 'hl,sp')),
  761. ((0xed, 0x7b, 0x56, 0x78), ('ld', 'sp,(7856)')),
  762. ((0xed, 0x7c), ('neg', '')),
  763. ((0xed, 0x7d), ('retn', '')),
  764. ((0xed, 0x7e), ('im', '2')),
  765. ((0xed, 0x7f), ('nop', '')),
  766. ((0xdd, 0xcb, 0x10, 0xc0), ('set', '0,(ix+10),b')),
  767. ((0xdd, 0xcb, 0x10, 0xc1), ('set', '0,(ix+10),c')),
  768. ((0xdd, 0xcb, 0x10, 0xc2), ('set', '0,(ix+10),d')),
  769. ((0xdd, 0xcb, 0x10, 0xc3), ('set', '0,(ix+10),e')),
  770. ((0xdd, 0xcb, 0x10, 0xc4), ('set', '0,(ix+10),h')),
  771. ((0xdd, 0xcb, 0x10, 0xc5), ('set', '0,(ix+10),l')),
  772. ((0xdd, 0xcb, 0x10, 0xc6), ('set', '0,(ix+10)')),
  773. ((0xdd, 0xcb, 0x10, 0xc7), ('set', '0,(ix+10),a')),
  774. ((0xdd, 0xcb, 0x10, 0x78), ('bit', '7,(ix+10)')),
  775. ((0xdd, 0xcb, 0x10, 0x79), ('bit', '7,(ix+10)')),
  776. ((0xdd, 0xcb, 0x10, 0x7a), ('bit', '7,(ix+10)')),
  777. ((0xdd, 0xcb, 0x10, 0x7b), ('bit', '7,(ix+10)')),
  778. ((0xdd, 0xcb, 0x10, 0x7c), ('bit', '7,(ix+10)')),
  779. ((0xdd, 0xcb, 0x10, 0x7d), ('bit', '7,(ix+10)')),
  780. ((0xdd, 0xcb, 0x10, 0x7e), ('bit', '7,(ix+10)')),
  781. ((0xdd, 0xcb, 0x10, 0x7f), ('bit', '7,(ix+10)')),
  782. ((0xfd, 0xcb, 0x10, 0xc0), ('set', '0,(iy+10),b')),
  783. ((0xfd, 0xcb, 0x10, 0xc1), ('set', '0,(iy+10),c')),
  784. ((0xfd, 0xcb, 0x10, 0xc2), ('set', '0,(iy+10),d')),
  785. ((0xfd, 0xcb, 0x10, 0xc3), ('set', '0,(iy+10),e')),
  786. ((0xfd, 0xcb, 0x10, 0xc4), ('set', '0,(iy+10),h')),
  787. ((0xfd, 0xcb, 0x10, 0xc5), ('set', '0,(iy+10),l')),
  788. ((0xfd, 0xcb, 0x10, 0xc6), ('set', '0,(iy+10)')),
  789. ((0xfd, 0xcb, 0x10, 0xc7), ('set', '0,(iy+10),a')),
  790. ((0xfd, 0xcb, 0x10, 0x78), ('bit', '7,(iy+10)')),
  791. ((0xfd, 0xcb, 0x10, 0x79), ('bit', '7,(iy+10)')),
  792. ((0xfd, 0xcb, 0x10, 0x7a), ('bit', '7,(iy+10)')),
  793. ((0xfd, 0xcb, 0x10, 0x7b), ('bit', '7,(iy+10)')),
  794. ((0xfd, 0xcb, 0x10, 0x7c), ('bit', '7,(iy+10)')),
  795. ((0xfd, 0xcb, 0x10, 0x7d), ('bit', '7,(iy+10)')),
  796. ((0xfd, 0xcb, 0x10, 0x7e), ('bit', '7,(iy+10)')),
  797. ((0xfd, 0xcb, 0x10, 0x7f), ('bit', '7,(iy+10)')),
  798. # multiple prefix handling
  799. ((0xfd, 0xdd), ('nop', '', 1)),
  800. ((0xfd, 0xed), ('nop', '', 1)),
  801. ((0xfd, 0xfd), ('nop', '', 1)),
  802. ((0xdd, 0xdd), ('nop', '', 1)),
  803. ((0xdd, 0xed), ('nop', '', 1)),
  804. ((0xdd, 0xfd), ('nop', '', 1)),
  805. # every opcode
  806. ((0x00,), ('nop', '')),
  807. ((0x01, 0x00, 0x00), ('ld', 'bc,0000')),
  808. ((0x02,), ('ld', '(bc),a')),
  809. ((0x03,), ('inc', 'bc')),
  810. ((0x04,), ('inc', 'b')),
  811. ((0x05,), ('dec', 'b')),
  812. ((0x06, 0x00), ('ld', 'b,00')),
  813. ((0x07,), ('rlca', '')),
  814. ((0x08,), ('ex', 'af,af\'')),
  815. ((0x09,), ('add', 'hl,bc')),
  816. ((0x0a,), ('ld', 'a,(bc)')),
  817. ((0x0b,), ('dec', 'bc')),
  818. ((0x0c,), ('inc', 'c')),
  819. ((0x0d,), ('dec', 'c')),
  820. ((0x0e, 0x00), ('ld', 'c,00')),
  821. ((0x0f,), ('rrca', '')),
  822. ((0x10, 0x00), ('djnz', '0002')),
  823. ((0x11, 0x00, 0x00), ('ld', 'de,0000')),
  824. ((0x12,), ('ld', '(de),a')),
  825. ((0x13,), ('inc', 'de')),
  826. ((0x14,), ('inc', 'd')),
  827. ((0x15,), ('dec', 'd')),
  828. ((0x16, 0x00), ('ld', 'd,00')),
  829. ((0x17,), ('rla', '')),
  830. ((0x18, 0x00), ('jr', '0002')),
  831. ((0x19,), ('add', 'hl,de')),
  832. ((0x1a,), ('ld', 'a,(de)')),
  833. ((0x1b,), ('dec', 'de')),
  834. ((0x1c,), ('inc', 'e')),
  835. ((0x1d,), ('dec', 'e')),
  836. ((0x1e, 0x00), ('ld', 'e,00')),
  837. ((0x1f,), ('rra', '')),
  838. ((0x20, 0x00), ('jr', 'nz,0002')),
  839. ((0x21, 0x00, 0x00), ('ld', 'hl,0000')),
  840. ((0x22, 0x00, 0x00), ('ld', '(0000),hl')),
  841. ((0x23,), ('inc', 'hl')),
  842. ((0x24,), ('inc', 'h')),
  843. ((0x25,), ('dec', 'h')),
  844. ((0x26, 0x00), ('ld', 'h,00')),
  845. ((0x27,), ('daa', '')),
  846. ((0x28, 0x00), ('jr', 'z,0002')),
  847. ((0x29,), ('add', 'hl,hl')),
  848. ((0x2a, 0x00, 0x00), ('ld', 'hl,(0000)')),
  849. ((0x2b,), ('dec', 'hl')),
  850. ((0x2c,), ('inc', 'l')),
  851. ((0x2d,), ('dec', 'l')),
  852. ((0x2e, 0x00), ('ld', 'l,00')),
  853. ((0x2f,), ('cpl', '')),
  854. ((0x30, 0x00), ('jr', 'nc,0002')),
  855. ((0x31, 0x00, 0x00), ('ld', 'sp,0000')),
  856. ((0x32, 0x00, 0x00), ('ld', '(0000),a')),
  857. ((0x33,), ('inc', 'sp')),
  858. ((0x34,), ('inc', '(hl)')),
  859. ((0x35,), ('dec', '(hl)')),
  860. ((0x36, 0x00), ('ld', '(hl),00')),
  861. ((0x37,), ('scf', '')),
  862. ((0x38, 0x00), ('jr', 'c,0002')),
  863. ((0x39,), ('add', 'hl,sp')),
  864. ((0x3a, 0x00, 0x00), ('ld', 'a,(0000)')),
  865. ((0x3b,), ('dec', 'sp')),
  866. ((0x3c,), ('inc', 'a')),
  867. ((0x3d,), ('dec', 'a')),
  868. ((0x3e, 0x00), ('ld', 'a,00')),
  869. ((0x3f,), ('ccf', '')),
  870. ((0x40,), ('ld', 'b,b')),
  871. ((0x41,), ('ld', 'b,c')),
  872. ((0x42,), ('ld', 'b,d')),
  873. ((0x43,), ('ld', 'b,e')),
  874. ((0x44,), ('ld', 'b,h')),
  875. ((0x45,), ('ld', 'b,l')),
  876. ((0x46,), ('ld', 'b,(hl)')),
  877. ((0x47,), ('ld', 'b,a')),
  878. ((0x48,), ('ld', 'c,b')),
  879. ((0x49,), ('ld', 'c,c')),
  880. ((0x4a,), ('ld', 'c,d')),
  881. ((0x4b,), ('ld', 'c,e')),
  882. ((0x4c,), ('ld', 'c,h')),
  883. ((0x4d,), ('ld', 'c,l')),
  884. ((0x4e,), ('ld', 'c,(hl)')),
  885. ((0x4f,), ('ld', 'c,a')),
  886. ((0x50,), ('ld', 'd,b')),
  887. ((0x51,), ('ld', 'd,c')),
  888. ((0x52,), ('ld', 'd,d')),
  889. ((0x53,), ('ld', 'd,e')),
  890. ((0x54,), ('ld', 'd,h')),
  891. ((0x55,), ('ld', 'd,l')),
  892. ((0x56,), ('ld', 'd,(hl)')),
  893. ((0x57,), ('ld', 'd,a')),
  894. ((0x58,), ('ld', 'e,b')),
  895. ((0x59,), ('ld', 'e,c')),
  896. ((0x5a,), ('ld', 'e,d')),
  897. ((0x5b,), ('ld', 'e,e')),
  898. ((0x5c,), ('ld', 'e,h')),
  899. ((0x5d,), ('ld', 'e,l')),
  900. ((0x5e,), ('ld', 'e,(hl)')),
  901. ((0x5f,), ('ld', 'e,a')),
  902. ((0x60,), ('ld', 'h,b')),
  903. ((0x61,), ('ld', 'h,c')),
  904. ((0x62,), ('ld', 'h,d')),
  905. ((0x63,), ('ld', 'h,e')),
  906. ((0x64,), ('ld', 'h,h')),
  907. ((0x65,), ('ld', 'h,l')),
  908. ((0x66,), ('ld', 'h,(hl)')),
  909. ((0x67,), ('ld', 'h,a')),
  910. ((0x68,), ('ld', 'l,b')),
  911. ((0x69,), ('ld', 'l,c')),
  912. ((0x6a,), ('ld', 'l,d')),
  913. ((0x6b,), ('ld', 'l,e')),
  914. ((0x6c,), ('ld', 'l,h')),
  915. ((0x6d,), ('ld', 'l,l')),
  916. ((0x6e,), ('ld', 'l,(hl)')),
  917. ((0x6f,), ('ld', 'l,a')),
  918. ((0x70,), ('ld', '(hl),b')),
  919. ((0x71,), ('ld', '(hl),c')),
  920. ((0x72,), ('ld', '(hl),d')),
  921. ((0x73,), ('ld', '(hl),e')),
  922. ((0x74,), ('ld', '(hl),h')),
  923. ((0x75,), ('ld', '(hl),l')),
  924. ((0x76,), ('halt', '')),
  925. ((0x77,), ('ld', '(hl),a')),
  926. ((0x78,), ('ld', 'a,b')),
  927. ((0x79,), ('ld', 'a,c')),
  928. ((0x7a,), ('ld', 'a,d')),
  929. ((0x7b,), ('ld', 'a,e')),
  930. ((0x7c,), ('ld', 'a,h')),
  931. ((0x7d,), ('ld', 'a,l')),
  932. ((0x7e,), ('ld', 'a,(hl)')),
  933. ((0x7f,), ('ld', 'a,a')),
  934. ((0x80,), ('add', 'a,b')),
  935. ((0x81,), ('add', 'a,c')),
  936. ((0x82,), ('add', 'a,d')),
  937. ((0x83,), ('add', 'a,e')),
  938. ((0x84,), ('add', 'a,h')),
  939. ((0x85,), ('add', 'a,l')),
  940. ((0x86,), ('add', 'a,(hl)')),
  941. ((0x87,), ('add', 'a,a')),
  942. ((0x88,), ('adc', 'a,b')),
  943. ((0x89,), ('adc', 'a,c')),
  944. ((0x8a,), ('adc', 'a,d')),
  945. ((0x8b,), ('adc', 'a,e')),
  946. ((0x8c,), ('adc', 'a,h')),
  947. ((0x8d,), ('adc', 'a,l')),
  948. ((0x8e,), ('adc', 'a,(hl)')),
  949. ((0x8f,), ('adc', 'a,a')),
  950. ((0x90,), ('sub', 'b')),
  951. ((0x91,), ('sub', 'c')),
  952. ((0x92,), ('sub', 'd')),
  953. ((0x93,), ('sub', 'e')),
  954. ((0x94,), ('sub', 'h')),
  955. ((0x95,), ('sub', 'l')),
  956. ((0x96,), ('sub', '(hl)')),
  957. ((0x97,), ('sub', 'a')),
  958. ((0x98,), ('sbc', 'a,b')),
  959. ((0x99,), ('sbc', 'a,c')),
  960. ((0x9a,), ('sbc', 'a,d')),
  961. ((0x9b,), ('sbc', 'a,e')),
  962. ((0x9c,), ('sbc', 'a,h')),
  963. ((0x9d,), ('sbc', 'a,l')),
  964. ((0x9e,), ('sbc', 'a,(hl)')),
  965. ((0x9f,), ('sbc', 'a,a')),
  966. ((0xa0,), ('and', 'b')),
  967. ((0xa1,), ('and', 'c')),
  968. ((0xa2,), ('and', 'd')),
  969. ((0xa3,), ('and', 'e')),
  970. ((0xa4,), ('and', 'h')),
  971. ((0xa5,), ('and', 'l')),
  972. ((0xa6,), ('and', '(hl)')),
  973. ((0xa7,), ('and', 'a')),
  974. ((0xa8,), ('xor', 'b')),
  975. ((0xa9,), ('xor', 'c')),
  976. ((0xaa,), ('xor', 'd')),
  977. ((0xab,), ('xor', 'e')),
  978. ((0xac,), ('xor', 'h')),
  979. ((0xad,), ('xor', 'l')),
  980. ((0xae,), ('xor', '(hl)')),
  981. ((0xaf,), ('xor', 'a')),
  982. ((0xb0,), ('or', 'b')),
  983. ((0xb1,), ('or', 'c')),
  984. ((0xb2,), ('or', 'd')),
  985. ((0xb3,), ('or', 'e')),
  986. ((0xb4,), ('or', 'h')),
  987. ((0xb5,), ('or', 'l')),
  988. ((0xb6,), ('or', '(hl)')),
  989. ((0xb7,), ('or', 'a')),
  990. ((0xb8,), ('cp', 'b')),
  991. ((0xb9,), ('cp', 'c')),
  992. ((0xba,), ('cp', 'd')),
  993. ((0xbb,), ('cp', 'e')),
  994. ((0xbc,), ('cp', 'h')),
  995. ((0xbd,), ('cp', 'l')),
  996. ((0xbe,), ('cp', '(hl)')),
  997. ((0xbf,), ('cp', 'a')),
  998. ((0xc0,), ('ret', 'nz')),
  999. ((0xc1,), ('pop', 'bc')),
  1000. ((0xc2, 0x00, 0x00), ('jp', 'nz,0000')),
  1001. ((0xc3, 0x00, 0x00), ('jp', '0000')),
  1002. ((0xc4, 0x00, 0x00), ('call', 'nz,0000')),
  1003. ((0xc5,), ('push', 'bc')),
  1004. ((0xc6, 0x00), ('add', 'a,00')),
  1005. ((0xc7,), ('rst', '00')),
  1006. ((0xc8,), ('ret', 'z')),
  1007. ((0xc9,), ('ret', '')),
  1008. ((0xca, 0x00, 0x00), ('jp', 'z,0000')),
  1009. ((0xcb, 0x00), ('rlc', 'b')),
  1010. ((0xcb, 0x01), ('rlc', 'c')),
  1011. ((0xcb, 0x02), ('rlc', 'd')),
  1012. ((0xcb, 0x03), ('rlc', 'e')),
  1013. ((0xcb, 0x04), ('rlc', 'h')),
  1014. ((0xcb, 0x05), ('rlc', 'l')),
  1015. ((0xcb, 0x06), ('rlc', '(hl)')),
  1016. ((0xcb, 0x07), ('rlc', 'a')),
  1017. ((0xcb, 0x08), ('rrc', 'b')),
  1018. ((0xcb, 0x09), ('rrc', 'c')),
  1019. ((0xcb, 0x0a), ('rrc', 'd')),
  1020. ((0xcb, 0x0b), ('rrc', 'e')),
  1021. ((0xcb, 0x0c), ('rrc', 'h')),
  1022. ((0xcb, 0x0d), ('rrc', 'l')),
  1023. ((0xcb, 0x0e), ('rrc', '(hl)')),
  1024. ((0xcb, 0x0f), ('rrc', 'a')),
  1025. ((0xcb, 0x10), ('rl', 'b')),
  1026. ((0xcb, 0x11), ('rl', 'c')),
  1027. ((0xcb, 0x12), ('rl', 'd')),
  1028. ((0xcb, 0x13), ('rl', 'e')),
  1029. ((0xcb, 0x14), ('rl', 'h')),
  1030. ((0xcb, 0x15), ('rl', 'l')),
  1031. ((0xcb, 0x16), ('rl', '(hl)')),
  1032. ((0xcb, 0x17), ('rl', 'a')),
  1033. ((0xcb, 0x18), ('rr', 'b')),
  1034. ((0xcb, 0x19), ('rr', 'c')),
  1035. ((0xcb, 0x1a), ('rr', 'd')),
  1036. ((0xcb, 0x1b), ('rr', 'e')),
  1037. ((0xcb, 0x1c), ('rr', 'h')),
  1038. ((0xcb, 0x1d), ('rr', 'l')),
  1039. ((0xcb, 0x1e), ('rr', '(hl)')),
  1040. ((0xcb, 0x1f), ('rr', 'a')),
  1041. ((0xcb, 0x20), ('sla', 'b')),
  1042. ((0xcb, 0x21), ('sla', 'c')),
  1043. ((0xcb, 0x22), ('sla', 'd')),
  1044. ((0xcb, 0x23), ('sla', 'e')),
  1045. ((0xcb, 0x24), ('sla', 'h')),
  1046. ((0xcb, 0x25), ('sla', 'l')),
  1047. ((0xcb, 0x26), ('sla', '(hl)')),
  1048. ((0xcb, 0x27), ('sla', 'a')),
  1049. ((0xcb, 0x28), ('sra', 'b')),
  1050. ((0xcb, 0x29), ('sra', 'c')),
  1051. ((0xcb, 0x2a), ('sra', 'd')),
  1052. ((0xcb, 0x2b), ('sra', 'e')),
  1053. ((0xcb, 0x2c), ('sra', 'h')),
  1054. ((0xcb, 0x2d), ('sra', 'l')),
  1055. ((0xcb, 0x2e), ('sra', '(hl)')),
  1056. ((0xcb, 0x2f), ('sra', 'a')),
  1057. ((0xcb, 0x30), ('sll', 'b')),
  1058. ((0xcb, 0x31), ('sll', 'c')),
  1059. ((0xcb, 0x32), ('sll', 'd')),
  1060. ((0xcb, 0x33), ('sll', 'e')),
  1061. ((0xcb, 0x34), ('sll', 'h')),
  1062. ((0xcb, 0x35), ('sll', 'l')),
  1063. ((0xcb, 0x36), ('sll', '(hl)')),
  1064. ((0xcb, 0x37), ('sll', 'a')),
  1065. ((0xcb, 0x38), ('srl', 'b')),
  1066. ((0xcb, 0x39), ('srl', 'c')),
  1067. ((0xcb, 0x3a), ('srl', 'd')),
  1068. ((0xcb, 0x3b), ('srl', 'e')),
  1069. ((0xcb, 0x3c), ('srl', 'h')),
  1070. ((0xcb, 0x3d), ('srl', 'l')),
  1071. ((0xcb, 0x3e), ('srl', '(hl)')),
  1072. ((0xcb, 0x3f), ('srl', 'a')),
  1073. ((0xcb, 0x40), ('bit', '0,b')),
  1074. ((0xcb, 0x41), ('bit', '0,c')),
  1075. ((0xcb, 0x42), ('bit', '0,d')),
  1076. ((0xcb, 0x43), ('bit', '0,e')),
  1077. ((0xcb, 0x44), ('bit', '0,h')),
  1078. ((0xcb, 0x45), ('bit', '0,l')),
  1079. ((0xcb, 0x46), ('bit', '0,(hl)')),
  1080. ((0xcb, 0x47), ('bit', '0,a')),
  1081. ((0xcb, 0x48), ('bit', '1,b')),
  1082. ((0xcb, 0x49), ('bit', '1,c')),
  1083. ((0xcb, 0x4a), ('bit', '1,d')),
  1084. ((0xcb, 0x4b), ('bit', '1,e')),
  1085. ((0xcb, 0x4c), ('bit', '1,h')),
  1086. ((0xcb, 0x4d), ('bit', '1,l')),
  1087. ((0xcb, 0x4e), ('bit', '1,(hl)')),
  1088. ((0xcb, 0x4f), ('bit', '1,a')),
  1089. ((0xcb, 0x50), ('bit', '2,b')),
  1090. ((0xcb, 0x51), ('bit', '2,c')),
  1091. ((0xcb, 0x52), ('bit', '2,d')),
  1092. ((0xcb, 0x53), ('bit', '2,e')),
  1093. ((0xcb, 0x54), ('bit', '2,h')),
  1094. ((0xcb, 0x55), ('bit', '2,l')),
  1095. ((0xcb, 0x56), ('bit', '2,(hl)')),
  1096. ((0xcb, 0x57), ('bit', '2,a')),
  1097. ((0xcb, 0x58), ('bit', '3,b')),
  1098. ((0xcb, 0x59), ('bit', '3,c')),
  1099. ((0xcb, 0x5a), ('bit', '3,d')),
  1100. ((0xcb, 0x5b), ('bit', '3,e')),
  1101. ((0xcb, 0x5c), ('bit', '3,h')),
  1102. ((0xcb, 0x5d), ('bit', '3,l')),
  1103. ((0xcb, 0x5e), ('bit', '3,(hl)')),
  1104. ((0xcb, 0x5f), ('bit', '3,a')),
  1105. ((0xcb, 0x60), ('bit', '4,b')),
  1106. ((0xcb, 0x61), ('bit', '4,c')),
  1107. ((0xcb, 0x62), ('bit', '4,d')),
  1108. ((0xcb, 0x63), ('bit', '4,e')),
  1109. ((0xcb, 0x64), ('bit', '4,h')),
  1110. ((0xcb, 0x65), ('bit', '4,l')),
  1111. ((0xcb, 0x66), ('bit', '4,(hl)')),
  1112. ((0xcb, 0x67), ('bit', '4,a')),
  1113. ((0xcb, 0x68), ('bit', '5,b')),
  1114. ((0xcb, 0x69), ('bit', '5,c')),
  1115. ((0xcb, 0x6a), ('bit', '5,d')),
  1116. ((0xcb, 0x6b), ('bit', '5,e')),
  1117. ((0xcb, 0x6c), ('bit', '5,h')),
  1118. ((0xcb, 0x6d), ('bit', '5,l')),
  1119. ((0xcb, 0x6e), ('bit', '5,(hl)')),
  1120. ((0xcb, 0x6f), ('bit', '5,a')),
  1121. ((0xcb, 0x70), ('bit', '6,b')),
  1122. ((0xcb, 0x71), ('bit', '6,c')),
  1123. ((0xcb, 0x72), ('bit', '6,d')),
  1124. ((0xcb, 0x73), ('bit', '6,e')),
  1125. ((0xcb, 0x74), ('bit', '6,h')),
  1126. ((0xcb, 0x75), ('bit', '6,l')),
  1127. ((0xcb, 0x76), ('bit', '6,(hl)')),
  1128. ((0xcb, 0x77), ('bit', '6,a')),
  1129. ((0xcb, 0x78), ('bit', '7,b')),
  1130. ((0xcb, 0x79), ('bit', '7,c')),
  1131. ((0xcb, 0x7a), ('bit', '7,d')),
  1132. ((0xcb, 0x7b), ('bit', '7,e')),
  1133. ((0xcb, 0x7c), ('bit', '7,h')),
  1134. ((0xcb, 0x7d), ('bit', '7,l')),
  1135. ((0xcb, 0x7e), ('bit', '7,(hl)')),
  1136. ((0xcb, 0x7f), ('bit', '7,a')),
  1137. ((0xcb, 0x80), ('res', '0,b')),
  1138. ((0xcb, 0x81), ('res', '0,c')),
  1139. ((0xcb, 0x82), ('res', '0,d')),
  1140. ((0xcb, 0x83), ('res', '0,e')),
  1141. ((0xcb, 0x84), ('res', '0,h')),
  1142. ((0xcb, 0x85), ('res', '0,l')),
  1143. ((0xcb, 0x86), ('res', '0,(hl)')),
  1144. ((0xcb, 0x87), ('res', '0,a')),
  1145. ((0xcb, 0x88), ('res', '1,b')),
  1146. ((0xcb, 0x89), ('res', '1,c')),
  1147. ((0xcb, 0x8a), ('res', '1,d')),
  1148. ((0xcb, 0x8b), ('res', '1,e')),
  1149. ((0xcb, 0x8c), ('res', '1,h')),
  1150. ((0xcb, 0x8d), ('res', '1,l')),
  1151. ((0xcb, 0x8e), ('res', '1,(hl)')),
  1152. ((0xcb, 0x8f), ('res', '1,a')),
  1153. ((0xcb, 0x90), ('res', '2,b')),
  1154. ((0xcb, 0x91), ('res', '2,c')),
  1155. ((0xcb, 0x92), ('res', '2,d')),
  1156. ((0xcb, 0x93), ('res', '2,e')),
  1157. ((0xcb, 0x94), ('res', '2,h')),
  1158. ((0xcb, 0x95), ('res', '2,l')),
  1159. ((0xcb, 0x96), ('res', '2,(hl)')),
  1160. ((0xcb, 0x97), ('res', '2,a')),
  1161. ((0xcb, 0x98), ('res', '3,b')),
  1162. ((0xcb, 0x99), ('res', '3,c')),
  1163. ((0xcb, 0x9a), ('res', '3,d')),
  1164. ((0xcb, 0x9b), ('res', '3,e')),
  1165. ((0xcb, 0x9c), ('res', '3,h')),
  1166. ((0xcb, 0x9d), ('res', '3,l')),
  1167. ((0xcb, 0x9e), ('res', '3,(hl)')),
  1168. ((0xcb, 0x9f), ('res', '3,a')),
  1169. ((0xcb, 0xa0), ('res', '4,b')),
  1170. ((0xcb, 0xa1), ('res', '4,c')),
  1171. ((0xcb, 0xa2), ('res', '4,d')),
  1172. ((0xcb, 0xa3), ('res', '4,e')),
  1173. ((0xcb, 0xa4), ('res', '4,h')),
  1174. ((0xcb, 0xa5), ('res', '4,l')),
  1175. ((0xcb, 0xa6), ('res', '4,(hl)')),
  1176. ((0xcb, 0xa7), ('res', '4,a')),
  1177. ((0xcb, 0xa8), ('res', '5,b')),
  1178. ((0xcb, 0xa9), ('res', '5,c')),
  1179. ((0xcb, 0xaa), ('res', '5,d')),
  1180. ((0xcb, 0xab), ('res', '5,e')),
  1181. ((0xcb, 0xac), ('res', '5,h')),
  1182. ((0xcb, 0xad), ('res', '5,l')),
  1183. ((0xcb, 0xae), ('res', '5,(hl)')),
  1184. ((0xcb, 0xaf), ('res', '5,a')),
  1185. ((0xcb, 0xb0), ('res', '6,b')),
  1186. ((0xcb, 0xb1), ('res', '6,c')),
  1187. ((0xcb, 0xb2), ('res', '6,d')),
  1188. ((0xcb, 0xb3), ('res', '6,e')),
  1189. ((0xcb, 0xb4), ('res', '6,h')),
  1190. ((0xcb, 0xb5), ('res', '6,l')),
  1191. ((0xcb, 0xb6), ('res', '6,(hl)')),
  1192. ((0xcb, 0xb7), ('res', '6,a')),
  1193. ((0xcb, 0xb8), ('res', '7,b')),
  1194. ((0xcb, 0xb9), ('res', '7,c')),
  1195. ((0xcb, 0xba), ('res', '7,d')),
  1196. ((0xcb, 0xbb), ('res', '7,e')),
  1197. ((0xcb, 0xbc), ('res', '7,h')),
  1198. ((0xcb, 0xbd), ('res', '7,l')),
  1199. ((0xcb, 0xbe), ('res', '7,(hl)')),
  1200. ((0xcb, 0xbf), ('res', '7,a')),
  1201. ((0xcb, 0xc0), ('set', '0,b')),
  1202. ((0xcb, 0xc1), ('set', '0,c')),
  1203. ((0xcb, 0xc2), ('set', '0,d')),
  1204. ((0xcb, 0xc3), ('set', '0,e')),
  1205. ((0xcb, 0xc4), ('set', '0,h')),
  1206. ((0xcb, 0xc5), ('set', '0,l')),
  1207. ((0xcb, 0xc6), ('set', '0,(hl)')),
  1208. ((0xcb, 0xc7), ('set', '0,a')),
  1209. ((0xcb, 0xc8), ('set', '1,b')),
  1210. ((0xcb, 0xc9), ('set', '1,c')),
  1211. ((0xcb, 0xca), ('set', '1,d')),
  1212. ((0xcb, 0xcb), ('set', '1,e')),
  1213. ((0xcb, 0xcc), ('set', '1,h')),
  1214. ((0xcb, 0xcd), ('set', '1,l')),
  1215. ((0xcb, 0xce), ('set', '1,(hl)')),
  1216. ((0xcb, 0xcf), ('set', '1,a')),
  1217. ((0xcb, 0xd0), ('set', '2,b')),
  1218. ((0xcb, 0xd1), ('set', '2,c')),
  1219. ((0xcb, 0xd2), ('set', '2,d')),
  1220. ((0xcb, 0xd3), ('set', '2,e')),
  1221. ((0xcb, 0xd4), ('set', '2,h')),
  1222. ((0xcb, 0xd5), ('set', '2,l')),
  1223. ((0xcb, 0xd6), ('set', '2,(hl)')),
  1224. ((0xcb, 0xd7), ('set', '2,a')),
  1225. ((0xcb, 0xd8), ('set', '3,b')),
  1226. ((0xcb, 0xd9), ('set', '3,c')),
  1227. ((0xcb, 0xda), ('set', '3,d')),
  1228. ((0xcb, 0xdb), ('set', '3,e')),
  1229. ((0xcb, 0xdc), ('set', '3,h')),
  1230. ((0xcb, 0xdd), ('set', '3,l')),
  1231. ((0xcb, 0xde), ('set', '3,(hl)')),
  1232. ((0xcb, 0xdf), ('set', '3,a')),
  1233. ((0xcb, 0xe0), ('set', '4,b')),
  1234. ((0xcb, 0xe1), ('set', '4,c')),
  1235. ((0xcb, 0xe2), ('set', '4,d')),
  1236. ((0xcb, 0xe3), ('set', '4,e')),
  1237. ((0xcb, 0xe4), ('set', '4,h')),
  1238. ((0xcb, 0xe5), ('set', '4,l')),
  1239. ((0xcb, 0xe6), ('set', '4,(hl)')),
  1240. ((0xcb, 0xe7), ('set', '4,a')),
  1241. ((0xcb, 0xe8), ('set', '5,b')),
  1242. ((0xcb, 0xe9), ('set', '5,c')),
  1243. ((0xcb, 0xea), ('set', '5,d')),
  1244. ((0xcb, 0xeb), ('set', '5,e')),
  1245. ((0xcb, 0xec), ('set', '5,h')),
  1246. ((0xcb, 0xed), ('set', '5,l')),
  1247. ((0xcb, 0xee), ('set', '5,(hl)')),
  1248. ((0xcb, 0xef), ('set', '5,a')),
  1249. ((0xcb, 0xf0), ('set', '6,b')),
  1250. ((0xcb, 0xf1), ('set', '6,c')),
  1251. ((0xcb, 0xf2), ('set', '6,d')),
  1252. ((0xcb, 0xf3), ('set', '6,e')),
  1253. ((0xcb, 0xf4), ('set', '6,h')),
  1254. ((0xcb, 0xf5), ('set', '6,l')),
  1255. ((0xcb, 0xf6), ('set', '6,(hl)')),
  1256. ((0xcb, 0xf7), ('set', '6,a')),
  1257. ((0xcb, 0xf8), ('set', '7,b')),
  1258. ((0xcb, 0xf9), ('set', '7,c')),
  1259. ((0xcb, 0xfa), ('set', '7,d')),
  1260. ((0xcb, 0xfb), ('set', '7,e')),
  1261. ((0xcb, 0xfc), ('set', '7,h')),
  1262. ((0xcb, 0xfd), ('set', '7,l')),
  1263. ((0xcb, 0xfe), ('set', '7,(hl)')),
  1264. ((0xcb, 0xff), ('set', '7,a')),
  1265. ((0xcc, 0x00, 0x00), ('call', 'z,0000')),
  1266. ((0xcd, 0x00, 0x00), ('call', '0000')),
  1267. ((0xce, 0x00), ('adc', 'a,00')),
  1268. ((0xcf,), ('rst', '08')),
  1269. ((0xd0,), ('ret', 'nc')),
  1270. ((0xd1,), ('pop', 'de')),
  1271. ((0xd2, 0x00, 0x00), ('jp', 'nc,0000')),
  1272. ((0xd3, 0x00), ('out', '(00),a')),
  1273. ((0xd4, 0x00, 0x00), ('call', 'nc,0000')),
  1274. ((0xd5,), ('push', 'de')),
  1275. ((0xd6, 0x00), ('sub', '00')),
  1276. ((0xd7,), ('rst', '10')),
  1277. ((0xd8,), ('ret', 'c')),
  1278. ((0xd9,), ('exx', '')),
  1279. ((0xda, 0x00, 0x00), ('jp', 'c,0000')),
  1280. ((0xdb, 0x00), ('in', 'a,(00)')),
  1281. ((0xdc, 0x00, 0x00), ('call', 'c,0000')),
  1282. ((0xdd, 0x09), ('add', 'ix,bc')),
  1283. ((0xdd, 0x19), ('add', 'ix,de')),
  1284. ((0xdd, 0x21, 0x00, 0x00), ('ld', 'ix,0000')),
  1285. ((0xdd, 0x22, 0x00, 0x00), ('ld', '(0000),ix')),
  1286. ((0xdd, 0x23), ('inc', 'ix')),
  1287. ((0xdd, 0x24), ('inc', 'ixh')),
  1288. ((0xdd, 0x25), ('dec', 'ixh')),
  1289. ((0xdd, 0x26, 0x00), ('ld', 'ixh,00')),
  1290. ((0xdd, 0x29), ('add', 'ix,ix')),
  1291. ((0xdd, 0x2a, 0x00, 0x00), ('ld', 'ix,(0000)')),
  1292. ((0xdd, 0x2b), ('dec', 'ix')),
  1293. ((0xdd, 0x2c), ('inc', 'ixl')),
  1294. ((0xdd, 0x2d), ('dec', 'ixl')),
  1295. ((0xdd, 0x2e, 0x00), ('ld', 'ixl,00')),
  1296. ((0xdd, 0x34, 0x00), ('inc', '(ix+00)')),
  1297. ((0xdd, 0x35, 0x00), ('dec', '(ix+00)')),
  1298. ((0xdd, 0x36, 0x00, 0x00), ('ld', '(ix+00),00')),
  1299. ((0xdd, 0x39), ('add', 'ix,sp')),
  1300. ((0xdd, 0x44), ('ld', 'b,ixh')),
  1301. ((0xdd, 0x45), ('ld', 'b,ixl')),
  1302. ((0xdd, 0x46, 0x00), ('ld', 'b,(ix+00)')),
  1303. ((0xdd, 0x4c), ('ld', 'c,ixh')),
  1304. ((0xdd, 0x4d), ('ld', 'c,ixl')),
  1305. ((0xdd, 0x4e, 0x00), ('ld', 'c,(ix+00)')),
  1306. ((0xdd, 0x54), ('ld', 'd,ixh')),
  1307. ((0xdd, 0x55), ('ld', 'd,ixl')),
  1308. ((0xdd, 0x56, 0x00), ('ld', 'd,(ix+00)')),
  1309. ((0xdd, 0x5c), ('ld', 'e,ixh')),
  1310. ((0xdd, 0x5d), ('ld', 'e,ixl')),
  1311. ((0xdd, 0x5e, 0x00), ('ld', 'e,(ix+00)')),
  1312. ((0xdd, 0x60), ('ld', 'ixh,b')),
  1313. ((0xdd, 0x61), ('ld', 'ixh,c')),
  1314. ((0xdd, 0x62), ('ld', 'ixh,d')),
  1315. ((0xdd, 0x63), ('ld', 'ixh,e')),
  1316. ((0xdd, 0x64), ('ld', 'ixh,ixh')),
  1317. ((0xdd, 0x65), ('ld', 'ixh,ixl')),
  1318. ((0xdd, 0x66, 0x00), ('ld', 'h,(ix+00)')),
  1319. ((0xdd, 0x67), ('ld', 'ixh,a')),
  1320. ((0xdd, 0x68), ('ld', 'ixl,b')),
  1321. ((0xdd, 0x69), ('ld', 'ixl,c')),
  1322. ((0xdd, 0x6a), ('ld', 'ixl,d')),
  1323. ((0xdd, 0x6b), ('ld', 'ixl,e')),
  1324. ((0xdd, 0x6c), ('ld', 'ixl,ixh')),
  1325. ((0xdd, 0x6d), ('ld', 'ixl,ixl')),
  1326. ((0xdd, 0x6e, 0x00), ('ld', 'l,(ix+00)')),
  1327. ((0xdd, 0x6f), ('ld', 'ixl,a')),
  1328. ((0xdd, 0x70, 0x00), ('ld', '(ix+00),b')),
  1329. ((0xdd, 0x71, 0x00), ('ld', '(ix+00),c')),
  1330. ((0xdd, 0x72, 0x00), ('ld', '(ix+00),d')),
  1331. ((0xdd, 0x73, 0x00), ('ld', '(ix+00),e')),
  1332. ((0xdd, 0x74, 0x00), ('ld', '(ix+00),h')),
  1333. ((0xdd, 0x75, 0x00), ('ld', '(ix+00),l')),
  1334. ((0xdd, 0x77, 0x00), ('ld', '(ix+00),a')),
  1335. ((0xdd, 0x7c), ('ld', 'a,ixh')),
  1336. ((0xdd, 0x7d), ('ld', 'a,ixl')),
  1337. ((0xdd, 0x7e, 0x00), ('ld', 'a,(ix+00)')),
  1338. ((0xdd, 0x84), ('add', 'a,ixh')),
  1339. ((0xdd, 0x85), ('add', 'a,ixl')),
  1340. ((0xdd, 0x86, 0x00), ('add', 'a,(ix+00)')),
  1341. ((0xdd, 0x8c), ('adc', 'a,ixh')),
  1342. ((0xdd, 0x8d), ('adc', 'a,ixl')),
  1343. ((0xdd, 0x8e, 0x00), ('adc', 'a,(ix+00)')),
  1344. ((0xdd, 0x94), ('sub', 'ixh')),
  1345. ((0xdd, 0x95), ('sub', 'ixl')),
  1346. ((0xdd, 0x96, 0x00), ('sub', '(ix+00)')),
  1347. ((0xdd, 0x9c), ('sbc', 'a,ixh')),
  1348. ((0xdd, 0x9d), ('sbc', 'a,ixl')),
  1349. ((0xdd, 0x9e, 0x00), ('sbc', 'a,(ix+00)')),
  1350. ((0xdd, 0xa4), ('and', 'ixh')),
  1351. ((0xdd, 0xa5), ('and', 'ixl')),
  1352. ((0xdd, 0xa6, 0x00), ('and', '(ix+00)')),
  1353. ((0xdd, 0xac), ('xor', 'ixh')),
  1354. ((0xdd, 0xad), ('xor', 'ixl')),
  1355. ((0xdd, 0xae, 0x00), ('xor', '(ix+00)')),
  1356. ((0xdd, 0xb4), ('or', 'ixh')),
  1357. ((0xdd, 0xb5), ('or', 'ixl')),
  1358. ((0xdd, 0xb6, 0x00), ('or', '(ix+00)')),
  1359. ((0xdd, 0xbc), ('cp', 'ixh')),
  1360. ((0xdd, 0xbd), ('cp', 'ixl')),
  1361. ((0xdd, 0xbe, 0x00), ('cp', '(ix+00)')),
  1362. ((0xdd, 0xcb, 0x00, 0x00), ('rlc', '(ix+00),b')),
  1363. ((0xdd, 0xcb, 0x00, 0x01), ('rlc', '(ix+00),c')),
  1364. ((0xdd, 0xcb, 0x00, 0x02), ('rlc', '(ix+00),d')),
  1365. ((0xdd, 0xcb, 0x00, 0x03), ('rlc', '(ix+00),e')),
  1366. ((0xdd, 0xcb, 0x00, 0x04), ('rlc', '(ix+00),h')),
  1367. ((0xdd, 0xcb, 0x00, 0x05), ('rlc', '(ix+00),l')),
  1368. ((0xdd, 0xcb, 0x00, 0x06), ('rlc', '(ix+00)')),
  1369. ((0xdd, 0xcb, 0x00, 0x07), ('rlc', '(ix+00),a')),
  1370. ((0xdd, 0xcb, 0x00, 0x08), ('rrc', '(ix+00),b')),
  1371. ((0xdd, 0xcb, 0x00, 0x09), ('rrc', '(ix+00),c')),
  1372. ((0xdd, 0xcb, 0x00, 0x0a), ('rrc', '(ix+00),d')),
  1373. ((0xdd, 0xcb, 0x00, 0x0b), ('rrc', '(ix+00),e')),
  1374. ((0xdd, 0xcb, 0x00, 0x0c), ('rrc', '(ix+00),h')),
  1375. ((0xdd, 0xcb, 0x00, 0x0d), ('rrc', '(ix+00),l')),
  1376. ((0xdd, 0xcb, 0x00, 0x0e), ('rrc', '(ix+00)')),
  1377. ((0xdd, 0xcb, 0x00, 0x0f), ('rrc', '(ix+00),a')),
  1378. ((0xdd, 0xcb, 0x00, 0x10), ('rl', '(ix+00),b')),
  1379. ((0xdd, 0xcb, 0x00, 0x11), ('rl', '(ix+00),c')),
  1380. ((0xdd, 0xcb, 0x00, 0x12), ('rl', '(ix+00),d')),
  1381. ((0xdd, 0xcb, 0x00, 0x13), ('rl', '(ix+00),e')),
  1382. ((0xdd, 0xcb, 0x00, 0x14), ('rl', '(ix+00),h')),
  1383. ((0xdd, 0xcb, 0x00, 0x15), ('rl', '(ix+00),l')),
  1384. ((0xdd, 0xcb, 0x00, 0x16), ('rl', '(ix+00)')),
  1385. ((0xdd, 0xcb, 0x00, 0x17), ('rl', '(ix+00),a')),
  1386. ((0xdd, 0xcb, 0x00, 0x18), ('rr', '(ix+00),b')),
  1387. ((0xdd, 0xcb, 0x00, 0x19), ('rr', '(ix+00),c')),
  1388. ((0xdd, 0xcb, 0x00, 0x1a), ('rr', '(ix+00),d')),
  1389. ((0xdd, 0xcb, 0x00, 0x1b), ('rr', '(ix+00),e')),
  1390. ((0xdd, 0xcb, 0x00, 0x1c), ('rr', '(ix+00),h')),
  1391. ((0xdd, 0xcb, 0x00, 0x1d), ('rr', '(ix+00),l')),
  1392. ((0xdd, 0xcb, 0x00, 0x1e), ('rr', '(ix+00)')),
  1393. ((0xdd, 0xcb, 0x00, 0x1f), ('rr', '(ix+00),a')),
  1394. ((0xdd, 0xcb, 0x00, 0x20), ('sla', '(ix+00),b')),
  1395. ((0xdd, 0xcb, 0x00, 0x21), ('sla', '(ix+00),c')),
  1396. ((0xdd, 0xcb, 0x00, 0x22), ('sla', '(ix+00),d')),
  1397. ((0xdd, 0xcb, 0x00, 0x23), ('sla', '(ix+00),e')),
  1398. ((0xdd, 0xcb, 0x00, 0x24), ('sla', '(ix+00),h')),
  1399. ((0xdd, 0xcb, 0x00, 0x25), ('sla', '(ix+00),l')),
  1400. ((0xdd, 0xcb, 0x00, 0x26), ('sla', '(ix+00)')),
  1401. ((0xdd, 0xcb, 0x00, 0x27), ('sla', '(ix+00),a')),
  1402. ((0xdd, 0xcb, 0x00, 0x28), ('sra', '(ix+00),b')),
  1403. ((0xdd, 0xcb, 0x00, 0x29), ('sra', '(ix+00),c')),
  1404. ((0xdd, 0xcb, 0x00, 0x2a), ('sra', '(ix+00),d')),
  1405. ((0xdd, 0xcb, 0x00, 0x2b), ('sra', '(ix+00),e')),
  1406. ((0xdd, 0xcb, 0x00, 0x2c), ('sra', '(ix+00),h')),
  1407. ((0xdd, 0xcb, 0x00, 0x2d), ('sra', '(ix+00),l')),
  1408. ((0xdd, 0xcb, 0x00, 0x2e), ('sra', '(ix+00)')),
  1409. ((0xdd, 0xcb, 0x00, 0x2f), ('sra', '(ix+00),a')),
  1410. ((0xdd, 0xcb, 0x00, 0x30), ('sll', '(ix+00),b')),
  1411. ((0xdd, 0xcb, 0x00, 0x31), ('sll', '(ix+00),c')),
  1412. ((0xdd, 0xcb, 0x00, 0x32), ('sll', '(ix+00),d')),
  1413. ((0xdd, 0xcb, 0x00, 0x33), ('sll', '(ix+00),e')),
  1414. ((0xdd, 0xcb, 0x00, 0x34), ('sll', '(ix+00),h')),
  1415. ((0xdd, 0xcb, 0x00, 0x35), ('sll', '(ix+00),l')),
  1416. ((0xdd, 0xcb, 0x00, 0x36), ('sll', '(ix+00)')),
  1417. ((0xdd, 0xcb, 0x00, 0x37), ('sll', '(ix+00),a')),
  1418. ((0xdd, 0xcb, 0x00, 0x38), ('srl', '(ix+00),b')),
  1419. ((0xdd, 0xcb, 0x00, 0x39), ('srl', '(ix+00),c')),
  1420. ((0xdd, 0xcb, 0x00, 0x3a), ('srl', '(ix+00),d')),
  1421. ((0xdd, 0xcb, 0x00, 0x3b), ('srl', '(ix+00),e')),
  1422. ((0xdd, 0xcb, 0x00, 0x3c), ('srl', '(ix+00),h')),
  1423. ((0xdd, 0xcb, 0x00, 0x3d), ('srl', '(ix+00),l')),
  1424. ((0xdd, 0xcb, 0x00, 0x3e), ('srl', '(ix+00)')),
  1425. ((0xdd, 0xcb, 0x00, 0x3f), ('srl', '(ix+00),a')),
  1426. ((0xdd, 0xcb, 0x00, 0x40), ('bit', '0,(ix+00)')),
  1427. ((0xdd, 0xcb, 0x00, 0x41), ('bit', '0,(ix+00)')),
  1428. ((0xdd, 0xcb, 0x00, 0x42), ('bit', '0,(ix+00)')),
  1429. ((0xdd, 0xcb, 0x00, 0x43), ('bit', '0,(ix+00)')),
  1430. ((0xdd, 0xcb, 0x00, 0x44), ('bit', '0,(ix+00)')),
  1431. ((0xdd, 0xcb, 0x00, 0x45), ('bit', '0,(ix+00)')),
  1432. ((0xdd, 0xcb, 0x00, 0x46), ('bit', '0,(ix+00)')),
  1433. ((0xdd, 0xcb, 0x00, 0x47), ('bit', '0,(ix+00)')),
  1434. ((0xdd, 0xcb, 0x00, 0x48), ('bit', '1,(ix+00)')),
  1435. ((0xdd, 0xcb, 0x00, 0x49), ('bit', '1,(ix+00)')),
  1436. ((0xdd, 0xcb, 0x00, 0x4a), ('bit', '1,(ix+00)')),
  1437. ((0xdd, 0xcb, 0x00, 0x4b), ('bit', '1,(ix+00)')),
  1438. ((0xdd, 0xcb, 0x00, 0x4c), ('bit', '1,(ix+00)')),
  1439. ((0xdd, 0xcb, 0x00, 0x4d), ('bit', '1,(ix+00)')),
  1440. ((0xdd, 0xcb, 0x00, 0x4e), ('bit', '1,(ix+00)')),
  1441. ((0xdd, 0xcb, 0x00, 0x4f), ('bit', '1,(ix+00)')),
  1442. ((0xdd, 0xcb, 0x00, 0x50), ('bit', '2,(ix+00)')),
  1443. ((0xdd, 0xcb, 0x00, 0x51), ('bit', '2,(ix+00)')),
  1444. ((0xdd, 0xcb, 0x00, 0x52), ('bit', '2,(ix+00)')),
  1445. ((0xdd, 0xcb, 0x00, 0x53), ('bit', '2,(ix+00)')),
  1446. ((0xdd, 0xcb, 0x00, 0x54), ('bit', '2,(ix+00)')),
  1447. ((0xdd, 0xcb, 0x00, 0x55), ('bit', '2,(ix+00)')),
  1448. ((0xdd, 0xcb, 0x00, 0x56), ('bit', '2,(ix+00)')),
  1449. ((0xdd, 0xcb, 0x00, 0x57), ('bit', '2,(ix+00)')),
  1450. ((0xdd, 0xcb, 0x00, 0x58), ('bit', '3,(ix+00)')),
  1451. ((0xdd, 0xcb, 0x00, 0x59), ('bit', '3,(ix+00)')),
  1452. ((0xdd, 0xcb, 0x00, 0x5a), ('bit', '3,(ix+00)')),
  1453. ((0xdd, 0xcb, 0x00, 0x5b), ('bit', '3,(ix+00)')),
  1454. ((0xdd, 0xcb, 0x00, 0x5c), ('bit', '3,(ix+00)')),
  1455. ((0xdd, 0xcb, 0x00, 0x5d), ('bit', '3,(ix+00)')),
  1456. ((0xdd, 0xcb, 0x00, 0x5e), ('bit', '3,(ix+00)')),
  1457. ((0xdd, 0xcb, 0x00, 0x5f), ('bit', '3,(ix+00)')),
  1458. ((0xdd, 0xcb, 0x00, 0x60), ('bit', '4,(ix+00)')),
  1459. ((0xdd, 0xcb, 0x00, 0x61), ('bit', '4,(ix+00)')),
  1460. ((0xdd, 0xcb, 0x00, 0x62), ('bit', '4,(ix+00)')),
  1461. ((0xdd, 0xcb, 0x00, 0x63), ('bit', '4,(ix+00)')),
  1462. ((0xdd, 0xcb, 0x00, 0x64), ('bit', '4,(ix+00)')),
  1463. ((0xdd, 0xcb, 0x00, 0x65), ('bit', '4,(ix+00)')),
  1464. ((0xdd, 0xcb, 0x00, 0x66), ('bit', '4,(ix+00)')),
  1465. ((0xdd, 0xcb, 0x00, 0x67), ('bit', '4,(ix+00)')),
  1466. ((0xdd, 0xcb, 0x00, 0x68), ('bit', '5,(ix+00)')),
  1467. ((0xdd, 0xcb, 0x00, 0x69), ('bit', '5,(ix+00)')),
  1468. ((0xdd, 0xcb, 0x00, 0x6a), ('bit', '5,(ix+00)')),
  1469. ((0xdd, 0xcb, 0x00, 0x6b), ('bit', '5,(ix+00)')),
  1470. ((0xdd, 0xcb, 0x00, 0x6c), ('bit', '5,(ix+00)')),
  1471. ((0xdd, 0xcb, 0x00, 0x6d), ('bit', '5,(ix+00)')),
  1472. ((0xdd, 0xcb, 0x00, 0x6e), ('bit', '5,(ix+00)')),
  1473. ((0xdd, 0xcb, 0x00, 0x6f), ('bit', '5,(ix+00)')),
  1474. ((0xdd, 0xcb, 0x00, 0x70), ('bit', '6,(ix+00)')),
  1475. ((0xdd, 0xcb, 0x00, 0x71), ('bit', '6,(ix+00)')),
  1476. ((0xdd, 0xcb, 0x00, 0x72), ('bit', '6,(ix+00)')),
  1477. ((0xdd, 0xcb, 0x00, 0x73), ('bit', '6,(ix+00)')),
  1478. ((0xdd, 0xcb, 0x00, 0x74), ('bit', '6,(ix+00)')),
  1479. ((0xdd, 0xcb, 0x00, 0x75), ('bit', '6,(ix+00)')),
  1480. ((0xdd, 0xcb, 0x00, 0x76), ('bit', '6,(ix+00)')),
  1481. ((0xdd, 0xcb, 0x00, 0x77), ('bit', '6,(ix+00)')),
  1482. ((0xdd, 0xcb, 0x00, 0x78), ('bit', '7,(ix+00)')),
  1483. ((0xdd, 0xcb, 0x00, 0x79), ('bit', '7,(ix+00)')),
  1484. ((0xdd, 0xcb, 0x00, 0x7a), ('bit', '7,(ix+00)')),
  1485. ((0xdd, 0xcb, 0x00, 0x7b), ('bit', '7,(ix+00)')),
  1486. ((0xdd, 0xcb, 0x00, 0x7c), ('bit', '7,(ix+00)')),
  1487. ((0xdd, 0xcb, 0x00, 0x7d), ('bit', '7,(ix+00)')),
  1488. ((0xdd, 0xcb, 0x00, 0x7e), ('bit', '7,(ix+00)')),
  1489. ((0xdd, 0xcb, 0x00, 0x7f), ('bit', '7,(ix+00)')),
  1490. ((0xdd, 0xcb, 0x00, 0x80), ('res', '0,(ix+00),b')),
  1491. ((0xdd, 0xcb, 0x00, 0x81), ('res', '0,(ix+00),c')),
  1492. ((0xdd, 0xcb, 0x00, 0x82), ('res', '0,(ix+00),d')),
  1493. ((0xdd, 0xcb, 0x00, 0x83), ('res', '0,(ix+00),e')),
  1494. ((0xdd, 0xcb, 0x00, 0x84), ('res', '0,(ix+00),h')),
  1495. ((0xdd, 0xcb, 0x00, 0x85), ('res', '0,(ix+00),l')),
  1496. ((0xdd, 0xcb, 0x00, 0x86), ('res', '0,(ix+00)')),
  1497. ((0xdd, 0xcb, 0x00, 0x87), ('res', '0,(ix+00),a')),
  1498. ((0xdd, 0xcb, 0x00, 0x88), ('res', '1,(ix+00),b')),
  1499. ((0xdd, 0xcb, 0x00, 0x89), ('res', '1,(ix+00),c')),
  1500. ((0xdd, 0xcb, 0x00, 0x8a), ('res', '1,(ix+00),d')),
  1501. ((0xdd, 0xcb, 0x00, 0x8b), ('res', '1,(ix+00),e')),
  1502. ((0xdd, 0xcb, 0x00, 0x8c), ('res', '1,(ix+00),h')),
  1503. ((0xdd, 0xcb, 0x00, 0x8d), ('res', '1,(ix+00),l')),
  1504. ((0xdd, 0xcb, 0x00, 0x8e), ('res', '1,(ix+00)')),
  1505. ((0xdd, 0xcb, 0x00, 0x8f), ('res', '1,(ix+00),a')),
  1506. ((0xdd, 0xcb, 0x00, 0x90), ('res', '2,(ix+00),b')),
  1507. ((0xdd, 0xcb, 0x00, 0x91), ('res', '2,(ix+00),c')),
  1508. ((0xdd, 0xcb, 0x00, 0x92), ('res', '2,(ix+00),d')),
  1509. ((0xdd, 0xcb, 0x00, 0x93), ('res', '2,(ix+00),e')),
  1510. ((0xdd, 0xcb, 0x00, 0x94), ('res', '2,(ix+00),h')),
  1511. ((0xdd, 0xcb, 0x00, 0x95), ('res', '2,(ix+00),l')),
  1512. ((0xdd, 0xcb, 0x00, 0x96), ('res', '2,(ix+00)')),
  1513. ((0xdd, 0xcb, 0x00, 0x97), ('res', '2,(ix+00),a')),
  1514. ((0xdd, 0xcb, 0x00, 0x98), ('res', '3,(ix+00),b')),
  1515. ((0xdd, 0xcb, 0x00, 0x99), ('res', '3,(ix+00),c')),
  1516. ((0xdd, 0xcb, 0x00, 0x9a), ('res', '3,(ix+00),d')),
  1517. ((0xdd, 0xcb, 0x00, 0x9b), ('res', '3,(ix+00),e')),
  1518. ((0xdd, 0xcb, 0x00, 0x9c), ('res', '3,(ix+00),h')),
  1519. ((0xdd, 0xcb, 0x00, 0x9d), ('res', '3,(ix+00),l')),
  1520. ((0xdd, 0xcb, 0x00, 0x9e), ('res', '3,(ix+00)')),
  1521. ((0xdd, 0xcb, 0x00, 0x9f), ('res', '3,(ix+00),a')),
  1522. ((0xdd, 0xcb, 0x00, 0xa0), ('res', '4,(ix+00),b')),
  1523. ((0xdd, 0xcb, 0x00, 0xa1), ('res', '4,(ix+00),c')),
  1524. ((0xdd, 0xcb, 0x00, 0xa2), ('res', '4,(ix+00),d')),
  1525. ((0xdd, 0xcb, 0x00, 0xa3), ('res', '4,(ix+00),e')),
  1526. ((0xdd, 0xcb, 0x00, 0xa4), ('res', '4,(ix+00),h')),
  1527. ((0xdd, 0xcb, 0x00, 0xa5), ('res', '4,(ix+00),l')),
  1528. ((0xdd, 0xcb, 0x00, 0xa6), ('res', '4,(ix+00)')),
  1529. ((0xdd, 0xcb, 0x00, 0xa7), ('res', '4,(ix+00),a')),
  1530. ((0xdd, 0xcb, 0x00, 0xa8), ('res', '5,(ix+00),b')),
  1531. ((0xdd, 0xcb, 0x00, 0xa9), ('res', '5,(ix+00),c')),
  1532. ((0xdd, 0xcb, 0x00, 0xaa), ('res', '5,(ix+00),d')),
  1533. ((0xdd, 0xcb, 0x00, 0xab), ('res', '5,(ix+00),e')),
  1534. ((0xdd, 0xcb, 0x00, 0xac), ('res', '5,(ix+00),h')),
  1535. ((0xdd, 0xcb, 0x00, 0xad), ('res', '5,(ix+00),l')),
  1536. ((0xdd, 0xcb, 0x00, 0xae), ('res', '5,(ix+00)')),
  1537. ((0xdd, 0xcb, 0x00, 0xaf), ('res', '5,(ix+00),a')),
  1538. ((0xdd, 0xcb, 0x00, 0xb0), ('res', '6,(ix+00),b')),
  1539. ((0xdd, 0xcb, 0x00, 0xb1), ('res', '6,(ix+00),c')),
  1540. ((0xdd, 0xcb, 0x00, 0xb2), ('res', '6,(ix+00),d')),
  1541. ((0xdd, 0xcb, 0x00, 0xb3), ('res', '6,(ix+00),e')),
  1542. ((0xdd, 0xcb, 0x00, 0xb4), ('res', '6,(ix+00),h')),
  1543. ((0xdd, 0xcb, 0x00, 0xb5), ('res', '6,(ix+00),l')),
  1544. ((0xdd, 0xcb, 0x00, 0xb6), ('res', '6,(ix+00)')),
  1545. ((0xdd, 0xcb, 0x00, 0xb7), ('res', '6,(ix+00),a')),
  1546. ((0xdd, 0xcb, 0x00, 0xb8), ('res', '7,(ix+00),b')),
  1547. ((0xdd, 0xcb, 0x00, 0xb9), ('res', '7,(ix+00),c')),
  1548. ((0xdd, 0xcb, 0x00, 0xba), ('res', '7,(ix+00),d')),
  1549. ((0xdd, 0xcb, 0x00, 0xbb), ('res', '7,(ix+00),e')),
  1550. ((0xdd, 0xcb, 0x00, 0xbc), ('res', '7,(ix+00),h')),
  1551. ((0xdd, 0xcb, 0x00, 0xbd), ('res', '7,(ix+00),l')),
  1552. ((0xdd, 0xcb, 0x00, 0xbe), ('res', '7,(ix+00)')),
  1553. ((0xdd, 0xcb, 0x00, 0xbf), ('res', '7,(ix+00),a')),
  1554. ((0xdd, 0xcb, 0x00, 0xc0), ('set', '0,(ix+00),b')),
  1555. ((0xdd, 0xcb, 0x00, 0xc1), ('set', '0,(ix+00),c')),
  1556. ((0xdd, 0xcb, 0x00, 0xc2), ('set', '0,(ix+00),d')),
  1557. ((0xdd, 0xcb, 0x00, 0xc3), ('set', '0,(ix+00),e')),
  1558. ((0xdd, 0xcb, 0x00, 0xc4), ('set', '0,(ix+00),h')),
  1559. ((0xdd, 0xcb, 0x00, 0xc5), ('set', '0,(ix+00),l')),
  1560. ((0xdd, 0xcb, 0x00, 0xc6), ('set', '0,(ix+00)')),
  1561. ((0xdd, 0xcb, 0x00, 0xc7), ('set', '0,(ix+00),a')),
  1562. ((0xdd, 0xcb, 0x00, 0xc8), ('set', '1,(ix+00),b')),
  1563. ((0xdd, 0xcb, 0x00, 0xc9), ('set', '1,(ix+00),c')),
  1564. ((0xdd, 0xcb, 0x00, 0xca), ('set', '1,(ix+00),d')),
  1565. ((0xdd, 0xcb, 0x00, 0xcb), ('set', '1,(ix+00),e')),
  1566. ((0xdd, 0xcb, 0x00, 0xcc), ('set', '1,(ix+00),h')),
  1567. ((0xdd, 0xcb, 0x00, 0xcd), ('set', '1,(ix+00),l')),
  1568. ((0xdd, 0xcb, 0x00, 0xce), ('set', '1,(ix+00)')),
  1569. ((0xdd, 0xcb, 0x00, 0xcf), ('set', '1,(ix+00),a')),
  1570. ((0xdd, 0xcb, 0x00, 0xd0), ('set', '2,(ix+00),b')),
  1571. ((0xdd, 0xcb, 0x00, 0xd1), ('set', '2,(ix+00),c')),
  1572. ((0xdd, 0xcb, 0x00, 0xd2), ('set', '2,(ix+00),d')),
  1573. ((0xdd, 0xcb, 0x00, 0xd3), ('set', '2,(ix+00),e')),
  1574. ((0xdd, 0xcb, 0x00, 0xd4), ('set', '2,(ix+00),h')),
  1575. ((0xdd, 0xcb, 0x00, 0xd5), ('set', '2,(ix+00),l')),
  1576. ((0xdd, 0xcb, 0x00, 0xd6), ('set', '2,(ix+00)')),
  1577. ((0xdd, 0xcb, 0x00, 0xd7), ('set', '2,(ix+00),a')),
  1578. ((0xdd, 0xcb, 0x00, 0xd8), ('set', '3,(ix+00),b')),
  1579. ((0xdd, 0xcb, 0x00, 0xd9), ('set', '3,(ix+00),c')),
  1580. ((0xdd, 0xcb, 0x00, 0xda), ('set', '3,(ix+00),d')),
  1581. ((0xdd, 0xcb, 0x00, 0xdb), ('set', '3,(ix+00),e')),
  1582. ((0xdd, 0xcb, 0x00, 0xdc), ('set', '3,(ix+00),h')),
  1583. ((0xdd, 0xcb, 0x00, 0xdd), ('set', '3,(ix+00),l')),
  1584. ((0xdd, 0xcb, 0x00, 0xde), ('set', '3,(ix+00)')),
  1585. ((0xdd, 0xcb, 0x00, 0xdf), ('set', '3,(ix+00),a')),
  1586. ((0xdd, 0xcb, 0x00, 0xe0), ('set', '4,(ix+00),b')),
  1587. ((0xdd, 0xcb, 0x00, 0xe1), ('set', '4,(ix+00),c')),
  1588. ((0xdd, 0xcb, 0x00, 0xe2), ('set', '4,(ix+00),d')),
  1589. ((0xdd, 0xcb, 0x00, 0xe3), ('set', '4,(ix+00),e')),
  1590. ((0xdd, 0xcb, 0x00, 0xe4), ('set', '4,(ix+00),h')),
  1591. ((0xdd, 0xcb, 0x00, 0xe5), ('set', '4,(ix+00),l')),
  1592. ((0xdd, 0xcb, 0x00, 0xe6), ('set', '4,(ix+00)')),
  1593. ((0xdd, 0xcb, 0x00, 0xe7), ('set', '4,(ix+00),a')),
  1594. ((0xdd, 0xcb, 0x00, 0xe8), ('set', '5,(ix+00),b')),
  1595. ((0xdd, 0xcb, 0x00, 0xe9), ('set', '5,(ix+00),c')),
  1596. ((0xdd, 0xcb, 0x00, 0xea), ('set', '5,(ix+00),d')),
  1597. ((0xdd, 0xcb, 0x00, 0xeb), ('set', '5,(ix+00),e')),
  1598. ((0xdd, 0xcb, 0x00, 0xec), ('set', '5,(ix+00),h')),
  1599. ((0xdd, 0xcb, 0x00, 0xed), ('set', '5,(ix+00),l')),
  1600. ((0xdd, 0xcb, 0x00, 0xee), ('set', '5,(ix+00)')),
  1601. ((0xdd, 0xcb, 0x00, 0xef), ('set', '5,(ix+00),a')),
  1602. ((0xdd, 0xcb, 0x00, 0xf0), ('set', '6,(ix+00),b')),
  1603. ((0xdd, 0xcb, 0x00, 0xf1), ('set', '6,(ix+00),c')),
  1604. ((0xdd, 0xcb, 0x00, 0xf2), ('set', '6,(ix+00),d')),
  1605. ((0xdd, 0xcb, 0x00, 0xf3), ('set', '6,(ix+00),e')),
  1606. ((0xdd, 0xcb, 0x00, 0xf4), ('set', '6,(ix+00),h')),
  1607. ((0xdd, 0xcb, 0x00, 0xf5), ('set', '6,(ix+00),l')),
  1608. ((0xdd, 0xcb, 0x00, 0xf6), ('set', '6,(ix+00)')),
  1609. ((0xdd, 0xcb, 0x00, 0xf7), ('set', '6,(ix+00),a')),
  1610. ((0xdd, 0xcb, 0x00, 0xf8), ('set', '7,(ix+00),b')),
  1611. ((0xdd, 0xcb, 0x00, 0xf9), ('set', '7,(ix+00),c')),
  1612. ((0xdd, 0xcb, 0x00, 0xfa), ('set', '7,(ix+00),d')),
  1613. ((0xdd, 0xcb, 0x00, 0xfb), ('set', '7,(ix+00),e')),
  1614. ((0xdd, 0xcb, 0x00, 0xfc), ('set', '7,(ix+00),h')),
  1615. ((0xdd, 0xcb, 0x00, 0xfd), ('set', '7,(ix+00),l')),
  1616. ((0xdd, 0xcb, 0x00, 0xfe), ('set', '7,(ix+00)')),
  1617. ((0xdd, 0xcb, 0x00, 0xff), ('set', '7,(ix+00),a')),
  1618. ((0xdd, 0xe1), ('pop', 'ix')),
  1619. ((0xdd, 0xe3), ('ex', '(sp),ix')),
  1620. ((0xdd, 0xe5), ('push', 'ix')),
  1621. ((0xdd, 0xe9), ('jp', 'ix')),
  1622. ((0xdd, 0xf9), ('ld', 'sp,ix')),
  1623. ((0xde, 0x00), ('sbc', 'a,00')),
  1624. ((0xdf,), ('rst', '18')),
  1625. ((0xe0,), ('ret', 'po')),
  1626. ((0xe1,), ('pop', 'hl')),
  1627. ((0xe2, 0x00, 0x00), ('jp', 'po,0000')),
  1628. ((0xe3,), ('ex', '(sp),hl')),
  1629. ((0xe4, 0x00, 0x00), ('call', 'po,0000')),
  1630. ((0xe5,), ('push', 'hl')),
  1631. ((0xe6, 0x00), ('and', '00')),
  1632. ((0xe7,), ('rst', '20')),
  1633. ((0xe8,), ('ret', 'pe')),
  1634. ((0xe9,), ('jp', 'hl')),
  1635. ((0xea, 0x00, 0x00), ('jp', 'pe,0000')),
  1636. ((0xeb,), ('ex', 'de,hl')),
  1637. ((0xec, 0x00, 0x00), ('call', 'pe,0000')),
  1638. ((0xed, 0x40), ('in', 'b,(c)')),
  1639. ((0xed, 0x41), ('out', '(c),b')),
  1640. ((0xed, 0x42), ('sbc', 'hl,bc')),
  1641. ((0xed, 0x43, 0x00, 0x00), ('ld', '(0000),bc')),
  1642. ((0xed, 0x44), ('neg', '')),
  1643. ((0xed, 0x45), ('retn', '')),
  1644. ((0xed, 0x46), ('im', '0')),
  1645. ((0xed, 0x47), ('ld', 'i,a')),
  1646. ((0xed, 0x48), ('in', 'c,(c)')),
  1647. ((0xed, 0x49), ('out', '(c),c')),
  1648. ((0xed, 0x4a), ('adc', 'hl,bc')),
  1649. ((0xed, 0x4b, 0x00, 0x00), ('ld', 'bc,(0000)')),
  1650. ((0xed, 0x4c), ('neg', '')),
  1651. ((0xed, 0x4d), ('reti', '')),
  1652. ((0xed, 0x4e), ('im', '0')),
  1653. ((0xed, 0x4f), ('ld', 'r,a')),
  1654. ((0xed, 0x50), ('in', 'd,(c)')),
  1655. ((0xed, 0x51), ('out', '(c),d')),
  1656. ((0xed, 0x52), ('sbc', 'hl,de')),
  1657. ((0xed, 0x53, 0x00, 0x00), ('ld', '(0000),de')),
  1658. ((0xed, 0x54), ('neg', '')),
  1659. ((0xed, 0x55), ('retn', '')),
  1660. ((0xed, 0x56), ('im', '1')),
  1661. ((0xed, 0x57), ('ld', 'a,i')),
  1662. ((0xed, 0x58), ('in', 'e,(c)')),
  1663. ((0xed, 0x59), ('out', '(c),e')),
  1664. ((0xed, 0x5a), ('adc', 'hl,de')),
  1665. ((0xed, 0x5b, 0x00, 0x00), ('ld', 'de,(0000)')),
  1666. ((0xed, 0x5c), ('neg', '')),
  1667. ((0xed, 0x5d), ('retn', '')),
  1668. ((0xed, 0x5e), ('im', '2')),
  1669. ((0xed, 0x5f), ('ld', 'a,r')),
  1670. ((0xed, 0x60), ('in', 'h,(c)')),
  1671. ((0xed, 0x61), ('out', '(c),h')),
  1672. ((0xed, 0x62), ('sbc', 'hl,hl')),
  1673. ((0xed, 0x63, 0x00, 0x00), ('ld', '(0000),hl')),
  1674. ((0xed, 0x64), ('neg', '')),
  1675. ((0xed, 0x65), ('retn', '')),
  1676. ((0xed, 0x66), ('im', '0')),
  1677. ((0xed, 0x67), ('rrd', '')),
  1678. ((0xed, 0x68), ('in', 'l,(c)')),
  1679. ((0xed, 0x69), ('out', '(c),l')),
  1680. ((0xed, 0x6a), ('adc', 'hl,hl')),
  1681. ((0xed, 0x6b, 0x00, 0x00), ('ld', 'hl,(0000)')),
  1682. ((0xed, 0x6c), ('neg', '')),
  1683. ((0xed, 0x6d), ('retn', '')),
  1684. ((0xed, 0x6e), ('im', '0')),
  1685. ((0xed, 0x6f), ('rld', '')),
  1686. ((0xed, 0x70), ('in', '(c)')),
  1687. ((0xed, 0x71), ('out', '(c)')),
  1688. ((0xed, 0x72), ('sbc', 'hl,sp')),
  1689. ((0xed, 0x73, 0x00, 0x00), ('ld', '(0000),sp')),
  1690. ((0xed, 0x74), ('neg', '')),
  1691. ((0xed, 0x75), ('retn', '')),
  1692. ((0xed, 0x76), ('im', '1')),
  1693. ((0xed, 0x78), ('in', 'a,(c)')),
  1694. ((0xed, 0x79), ('out', '(c),a')),
  1695. ((0xed, 0x7a), ('adc', 'hl,sp')),
  1696. ((0xed, 0x7b, 0x00, 0x00), ('ld', 'sp,(0000)')),
  1697. ((0xed, 0x7c), ('neg', '')),
  1698. ((0xed, 0x7d), ('retn', '')),
  1699. ((0xed, 0x7e), ('im', '2')),
  1700. ((0xed, 0xa0), ('ldi', '')),
  1701. ((0xed, 0xa1), ('cpi', '')),
  1702. ((0xed, 0xa2), ('ini', '')),
  1703. ((0xed, 0xa3), ('outi', '')),
  1704. ((0xed, 0xa8), ('ldd', '')),
  1705. ((0xed, 0xa9), ('cpd', '')),
  1706. ((0xed, 0xaa), ('ind', '')),
  1707. ((0xed, 0xab), ('outd', '')),
  1708. ((0xed, 0xb0), ('ldir', '')),
  1709. ((0xed, 0xb1), ('cpir', '')),
  1710. ((0xed, 0xb2), ('inir', '')),
  1711. ((0xed, 0xb3), ('otir', '')),
  1712. ((0xed, 0xb8), ('lddr', '')),
  1713. ((0xed, 0xb9), ('cpdr', '')),
  1714. ((0xed, 0xba), ('indr', '')),
  1715. ((0xed, 0xbb), ('otdr', '')),
  1716. ((0xee, 0x00), ('xor', '00')),
  1717. ((0xef,), ('rst', '28')),
  1718. ((0xf0,), ('ret', 'p')),
  1719. ((0xf1,), ('pop', 'af')),
  1720. ((0xf2, 0x00, 0x00), ('jp', 'p,0000')),
  1721. ((0xf3,), ('di', '')),
  1722. ((0xf4, 0x00, 0x00), ('call', 'p,0000')),
  1723. ((0xf5,), ('push', 'af')),
  1724. ((0xf6, 0x00), ('or', '00')),
  1725. ((0xf7,), ('rst', '30')),
  1726. ((0xf8,), ('ret', 'm')),
  1727. ((0xf9,), ('ld', 'sp,hl')),
  1728. ((0xfa, 0x00, 0x00), ('jp', 'm,0000')),
  1729. ((0xfb,), ('ei', '')),
  1730. ((0xfc, 0x00, 0x00), ('call', 'm,0000')),
  1731. ((0xfd, 0x09), ('add', 'iy,bc')),
  1732. ((0xfd, 0x19), ('add', 'iy,de')),
  1733. ((0xfd, 0x21, 0x00, 0x00), ('ld', 'iy,0000')),
  1734. ((0xfd, 0x22, 0x00, 0x00), ('ld', '(0000),iy')),
  1735. ((0xfd, 0x23), ('inc', 'iy')),
  1736. ((0xfd, 0x24), ('inc', 'iyh')),
  1737. ((0xfd, 0x25), ('dec', 'iyh')),
  1738. ((0xfd, 0x26, 0x00), ('ld', 'iyh,00')),
  1739. ((0xfd, 0x29), ('add', 'iy,iy')),
  1740. ((0xfd, 0x2a, 0x00, 0x00), ('ld', 'iy,(0000)')),
  1741. ((0xfd, 0x2b), ('dec', 'iy')),
  1742. ((0xfd, 0x2c), ('inc', 'iyl')),
  1743. ((0xfd, 0x2d), ('dec', 'iyl')),
  1744. ((0xfd, 0x2e, 0x00), ('ld', 'iyl,00')),
  1745. ((0xfd, 0x34, 0x00), ('inc', '(iy+00)')),
  1746. ((0xfd, 0x35, 0x00), ('dec', '(iy+00)')),
  1747. ((0xfd, 0x36, 0x00, 0x00), ('ld', '(iy+00),00')),
  1748. ((0xfd, 0x39), ('add', 'iy,sp')),
  1749. ((0xfd, 0x44), ('ld', 'b,iyh')),
  1750. ((0xfd, 0x45), ('ld', 'b,iyl')),
  1751. ((0xfd, 0x46, 0x00), ('ld', 'b,(iy+00)')),
  1752. ((0xfd, 0x4c), ('ld', 'c,iyh')),
  1753. ((0xfd, 0x4d), ('ld', 'c,iyl')),
  1754. ((0xfd, 0x4e, 0x00), ('ld', 'c,(iy+00)')),
  1755. ((0xfd, 0x54), ('ld', 'd,iyh')),
  1756. ((0xfd, 0x55), ('ld', 'd,iyl')),
  1757. ((0xfd, 0x56, 0x00), ('ld', 'd,(iy+00)')),
  1758. ((0xfd, 0x5c), ('ld', 'e,iyh')),
  1759. ((0xfd, 0x5d), ('ld', 'e,iyl')),
  1760. ((0xfd, 0x5e, 0x00), ('ld', 'e,(iy+00)')),
  1761. ((0xfd, 0x60), ('ld', 'iyh,b')),
  1762. ((0xfd, 0x61), ('ld', 'iyh,c')),
  1763. ((0xfd, 0x62), ('ld', 'iyh,d')),
  1764. ((0xfd, 0x63), ('ld', 'iyh,e')),
  1765. ((0xfd, 0x64), ('ld', 'iyh,iyh')),
  1766. ((0xfd, 0x65), ('ld', 'iyh,iyl')),
  1767. ((0xfd, 0x66, 0x00), ('ld', 'h,(iy+00)')),
  1768. ((0xfd, 0x67), ('ld', 'iyh,a')),
  1769. ((0xfd, 0x68), ('ld', 'iyl,b')),
  1770. ((0xfd, 0x69), ('ld', 'iyl,c')),
  1771. ((0xfd, 0x6a), ('ld', 'iyl,d')),
  1772. ((0xfd, 0x6b), ('ld', 'iyl,e')),
  1773. ((0xfd, 0x6c), ('ld', 'iyl,iyh')),
  1774. ((0xfd, 0x6d), ('ld', 'iyl,iyl')),
  1775. ((0xfd, 0x6e, 0x00), ('ld', 'l,(iy+00)')),
  1776. ((0xfd, 0x6f), ('ld', 'iyl,a')),
  1777. ((0xfd, 0x70, 0x00), ('ld', '(iy+00),b')),
  1778. ((0xfd, 0x71, 0x00), ('ld', '(iy+00),c')),
  1779. ((0xfd, 0x72, 0x00), ('ld', '(iy+00),d')),
  1780. ((0xfd, 0x73, 0x00), ('ld', '(iy+00),e')),
  1781. ((0xfd, 0x74, 0x00), ('ld', '(iy+00),h')),
  1782. ((0xfd, 0x75, 0x00), ('ld', '(iy+00),l')),
  1783. ((0xfd, 0x77, 0x00), ('ld', '(iy+00),a')),
  1784. ((0xfd, 0x7c), ('ld', 'a,iyh')),
  1785. ((0xfd, 0x7d), ('ld', 'a,iyl')),
  1786. ((0xfd, 0x7e, 0x00), ('ld', 'a,(iy+00)')),
  1787. ((0xfd, 0x84), ('add', 'a,iyh')),
  1788. ((0xfd, 0x85), ('add', 'a,iyl')),
  1789. ((0xfd, 0x86, 0x00), ('add', 'a,(iy+00)')),
  1790. ((0xfd, 0x8c), ('adc', 'a,iyh')),
  1791. ((0xfd, 0x8d), ('adc', 'a,iyl')),
  1792. ((0xfd, 0x8e, 0x00), ('adc', 'a,(iy+00)')),
  1793. ((0xfd, 0x94), ('sub', 'iyh')),
  1794. ((0xfd, 0x95), ('sub', 'iyl')),
  1795. ((0xfd, 0x96, 0x00), ('sub', '(iy+00)')),
  1796. ((0xfd, 0x9c), ('sbc', 'a,iyh')),
  1797. ((0xfd, 0x9d), ('sbc', 'a,iyl')),
  1798. ((0xfd, 0x9e, 0x00), ('sbc', 'a,(iy+00)')),
  1799. ((0xfd, 0xa4), ('and', 'iyh')),
  1800. ((0xfd, 0xa5), ('and', 'iyl')),
  1801. ((0xfd, 0xa6, 0x00), ('and', '(iy+00)')),
  1802. ((0xfd, 0xac), ('xor', 'iyh')),
  1803. ((0xfd, 0xad), ('xor', 'iyl')),
  1804. ((0xfd, 0xae, 0x00), ('xor', '(iy+00)')),
  1805. ((0xfd, 0xb4), ('or', 'iyh')),
  1806. ((0xfd, 0xb5), ('or', 'iyl')),
  1807. ((0xfd, 0xb6, 0x00), ('or', '(iy+00)')),
  1808. ((0xfd, 0xbc), ('cp', 'iyh')),
  1809. ((0xfd, 0xbd), ('cp', 'iyl')),
  1810. ((0xfd, 0xbe, 0x00), ('cp', '(iy+00)')),
  1811. ((0xfd, 0xcb, 0x00, 0x00), ('rlc', '(iy+00),b')),
  1812. ((0xfd, 0xcb, 0x00, 0x01), ('rlc', '(iy+00),c')),
  1813. ((0xfd, 0xcb, 0x00, 0x02), ('rlc', '(iy+00),d')),
  1814. ((0xfd, 0xcb, 0x00, 0x03), ('rlc', '(iy+00),e')),
  1815. ((0xfd, 0xcb, 0x00, 0x04), ('rlc', '(iy+00),h')),
  1816. ((0xfd, 0xcb, 0x00, 0x05), ('rlc', '(iy+00),l')),
  1817. ((0xfd, 0xcb, 0x00, 0x06), ('rlc', '(iy+00)')),
  1818. ((0xfd, 0xcb, 0x00, 0x07), ('rlc', '(iy+00),a')),
  1819. ((0xfd, 0xcb, 0x00, 0x08), ('rrc', '(iy+00),b')),
  1820. ((0xfd, 0xcb, 0x00, 0x09), ('rrc', '(iy+00),c')),
  1821. ((0xfd, 0xcb, 0x00, 0x0a), ('rrc', '(iy+00),d')),
  1822. ((0xfd, 0xcb, 0x00, 0x0b), ('rrc', '(iy+00),e')),
  1823. ((0xfd, 0xcb, 0x00, 0x0c), ('rrc', '(iy+00),h')),
  1824. ((0xfd, 0xcb, 0x00, 0x0d), ('rrc', '(iy+00),l')),
  1825. ((0xfd, 0xcb, 0x00, 0x0e), ('rrc', '(iy+00)')),
  1826. ((0xfd, 0xcb, 0x00, 0x0f), ('rrc', '(iy+00),a')),
  1827. ((0xfd, 0xcb, 0x00, 0x10), ('rl', '(iy+00),b')),
  1828. ((0xfd, 0xcb, 0x00, 0x11), ('rl', '(iy+00),c')),
  1829. ((0xfd, 0xcb, 0x00, 0x12), ('rl', '(iy+00),d')),
  1830. ((0xfd, 0xcb, 0x00, 0x13), ('rl', '(iy+00),e')),
  1831. ((0xfd, 0xcb, 0x00, 0x14), ('rl', '(iy+00),h')),
  1832. ((0xfd, 0xcb, 0x00, 0x15), ('rl', '(iy+00),l')),
  1833. ((0xfd, 0xcb, 0x00, 0x16), ('rl', '(iy+00)')),
  1834. ((0xfd, 0xcb, 0x00, 0x17), ('rl', '(iy+00),a')),
  1835. ((0xfd, 0xcb, 0x00, 0x18), ('rr', '(iy+00),b')),
  1836. ((0xfd, 0xcb, 0x00, 0x19), ('rr', '(iy+00),c')),
  1837. ((0xfd, 0xcb, 0x00, 0x1a), ('rr', '(iy+00),d')),
  1838. ((0xfd, 0xcb, 0x00, 0x1b), ('rr', '(iy+00),e')),
  1839. ((0xfd, 0xcb, 0x00, 0x1c), ('rr', '(iy+00),h')),
  1840. ((0xfd, 0xcb, 0x00, 0x1d), ('rr', '(iy+00),l')),
  1841. ((0xfd, 0xcb, 0x00, 0x1e), ('rr', '(iy+00)')),
  1842. ((0xfd, 0xcb, 0x00, 0x1f), ('rr', '(iy+00),a')),
  1843. ((0xfd, 0xcb, 0x00, 0x20), ('sla', '(iy+00),b')),
  1844. ((0xfd, 0xcb, 0x00, 0x21), ('sla', '(iy+00),c')),
  1845. ((0xfd, 0xcb, 0x00, 0x22), ('sla', '(iy+00),d')),
  1846. ((0xfd, 0xcb, 0x00, 0x23), ('sla', '(iy+00),e')),
  1847. ((0xfd, 0xcb, 0x00, 0x24), ('sla', '(iy+00),h')),
  1848. ((0xfd, 0xcb, 0x00, 0x25), ('sla', '(iy+00),l')),
  1849. ((0xfd, 0xcb, 0x00, 0x26), ('sla', '(iy+00)')),
  1850. ((0xfd, 0xcb, 0x00, 0x27), ('sla', '(iy+00),a')),
  1851. ((0xfd, 0xcb, 0x00, 0x28), ('sra', '(iy+00),b')),
  1852. ((0xfd, 0xcb, 0x00, 0x29), ('sra', '(iy+00),c')),
  1853. ((0xfd, 0xcb, 0x00, 0x2a), ('sra', '(iy+00),d')),
  1854. ((0xfd, 0xcb, 0x00, 0x2b), ('sra', '(iy+00),e')),
  1855. ((0xfd, 0xcb, 0x00, 0x2c), ('sra', '(iy+00),h')),
  1856. ((0xfd, 0xcb, 0x00, 0x2d), ('sra', '(iy+00),l')),
  1857. ((0xfd, 0xcb, 0x00, 0x2e), ('sra', '(iy+00)')),
  1858. ((0xfd, 0xcb, 0x00, 0x2f), ('sra', '(iy+00),a')),
  1859. ((0xfd, 0xcb, 0x00, 0x30), ('sll', '(iy+00),b')),
  1860. ((0xfd, 0xcb, 0x00, 0x31), ('sll', '(iy+00),c')),
  1861. ((0xfd, 0xcb, 0x00, 0x32), ('sll', '(iy+00),d')),
  1862. ((0xfd, 0xcb, 0x00, 0x33), ('sll', '(iy+00),e')),
  1863. ((0xfd, 0xcb, 0x00, 0x34), ('sll', '(iy+00),h')),
  1864. ((0xfd, 0xcb, 0x00, 0x35), ('sll', '(iy+00),l')),
  1865. ((0xfd, 0xcb, 0x00, 0x36), ('sll', '(iy+00)')),
  1866. ((0xfd, 0xcb, 0x00, 0x37), ('sll', '(iy+00),a')),
  1867. ((0xfd, 0xcb, 0x00, 0x38), ('srl', '(iy+00),b')),
  1868. ((0xfd, 0xcb, 0x00, 0x39), ('srl', '(iy+00),c')),
  1869. ((0xfd, 0xcb, 0x00, 0x3a), ('srl', '(iy+00),d')),
  1870. ((0xfd, 0xcb, 0x00, 0x3b), ('srl', '(iy+00),e')),
  1871. ((0xfd, 0xcb, 0x00, 0x3c), ('srl', '(iy+00),h')),
  1872. ((0xfd, 0xcb, 0x00, 0x3d), ('srl', '(iy+00),l')),
  1873. ((0xfd, 0xcb, 0x00, 0x3e), ('srl', '(iy+00)')),
  1874. ((0xfd, 0xcb, 0x00, 0x3f), ('srl', '(iy+00),a')),
  1875. ((0xfd, 0xcb, 0x00, 0x40), ('bit', '0,(iy+00)')),
  1876. ((0xfd, 0xcb, 0x00, 0x41), ('bit', '0,(iy+00)')),
  1877. ((0xfd, 0xcb, 0x00, 0x42), ('bit', '0,(iy+00)')),
  1878. ((0xfd, 0xcb, 0x00, 0x43), ('bit', '0,(iy+00)')),
  1879. ((0xfd, 0xcb, 0x00, 0x44), ('bit', '0,(iy+00)')),
  1880. ((0xfd, 0xcb, 0x00, 0x45), ('bit', '0,(iy+00)')),
  1881. ((0xfd, 0xcb, 0x00, 0x46), ('bit', '0,(iy+00)')),
  1882. ((0xfd, 0xcb, 0x00, 0x47), ('bit', '0,(iy+00)')),
  1883. ((0xfd, 0xcb, 0x00, 0x48), ('bit', '1,(iy+00)')),
  1884. ((0xfd, 0xcb, 0x00, 0x49), ('bit', '1,(iy+00)')),
  1885. ((0xfd, 0xcb, 0x00, 0x4a), ('bit', '1,(iy+00)')),
  1886. ((0xfd, 0xcb, 0x00, 0x4b), ('bit', '1,(iy+00)')),
  1887. ((0xfd, 0xcb, 0x00, 0x4c), ('bit', '1,(iy+00)')),
  1888. ((0xfd, 0xcb, 0x00, 0x4d), ('bit', '1,(iy+00)')),
  1889. ((0xfd, 0xcb, 0x00, 0x4e), ('bit', '1,(iy+00)')),
  1890. ((0xfd, 0xcb, 0x00, 0x4f), ('bit', '1,(iy+00)')),
  1891. ((0xfd, 0xcb, 0x00, 0x50), ('bit', '2,(iy+00)')),
  1892. ((0xfd, 0xcb, 0x00, 0x51), ('bit', '2,(iy+00)')),
  1893. ((0xfd, 0xcb, 0x00, 0x52), ('bit', '2,(iy+00)')),
  1894. ((0xfd, 0xcb, 0x00, 0x53), ('bit', '2,(iy+00)')),
  1895. ((0xfd, 0xcb, 0x00, 0x54), ('bit', '2,(iy+00)')),
  1896. ((0xfd, 0xcb, 0x00, 0x55), ('bit', '2,(iy+00)')),
  1897. ((0xfd, 0xcb, 0x00, 0x56), ('bit', '2,(iy+00)')),
  1898. ((0xfd, 0xcb, 0x00, 0x57), ('bit', '2,(iy+00)')),
  1899. ((0xfd, 0xcb, 0x00, 0x58), ('bit', '3,(iy+00)')),
  1900. ((0xfd, 0xcb, 0x00, 0x59), ('bit', '3,(iy+00)')),
  1901. ((0xfd, 0xcb, 0x00, 0x5a), ('bit', '3,(iy+00)')),
  1902. ((0xfd, 0xcb, 0x00, 0x5b), ('bit', '3,(iy+00)')),
  1903. ((0xfd, 0xcb, 0x00, 0x5c), ('bit', '3,(iy+00)')),
  1904. ((0xfd, 0xcb, 0x00, 0x5d), ('bit', '3,(iy+00)')),
  1905. ((0xfd, 0xcb, 0x00, 0x5e), ('bit', '3,(iy+00)')),
  1906. ((0xfd, 0xcb, 0x00, 0x5f), ('bit', '3,(iy+00)')),
  1907. ((0xfd, 0xcb, 0x00, 0x60), ('bit', '4,(iy+00)')),
  1908. ((0xfd, 0xcb, 0x00, 0x61), ('bit', '4,(iy+00)')),
  1909. ((0xfd, 0xcb, 0x00, 0x62), ('bit', '4,(iy+00)')),
  1910. ((0xfd, 0xcb, 0x00, 0x63), ('bit', '4,(iy+00)')),
  1911. ((0xfd, 0xcb, 0x00, 0x64), ('bit', '4,(iy+00)')),
  1912. ((0xfd, 0xcb, 0x00, 0x65), ('bit', '4,(iy+00)')),
  1913. ((0xfd, 0xcb, 0x00, 0x66), ('bit', '4,(iy+00)')),
  1914. ((0xfd, 0xcb, 0x00, 0x67), ('bit', '4,(iy+00)')),
  1915. ((0xfd, 0xcb, 0x00, 0x68), ('bit', '5,(iy+00)')),
  1916. ((0xfd, 0xcb, 0x00, 0x69), ('bit', '5,(iy+00)')),
  1917. ((0xfd, 0xcb, 0x00, 0x6a), ('bit', '5,(iy+00)')),
  1918. ((0xfd, 0xcb, 0x00, 0x6b), ('bit', '5,(iy+00)')),
  1919. ((0xfd, 0xcb, 0x00, 0x6c), ('bit', '5,(iy+00)')),
  1920. ((0xfd, 0xcb, 0x00, 0x6d), ('bit', '5,(iy+00)')),
  1921. ((0xfd, 0xcb, 0x00, 0x6e), ('bit', '5,(iy+00)')),
  1922. ((0xfd, 0xcb, 0x00, 0x6f), ('bit', '5,(iy+00)')),
  1923. ((0xfd, 0xcb, 0x00, 0x70), ('bit', '6,(iy+00)')),
  1924. ((0xfd, 0xcb, 0x00, 0x71), ('bit', '6,(iy+00)')),
  1925. ((0xfd, 0xcb, 0x00, 0x72), ('bit', '6,(iy+00)')),
  1926. ((0xfd, 0xcb, 0x00, 0x73), ('bit', '6,(iy+00)')),
  1927. ((0xfd, 0xcb, 0x00, 0x74), ('bit', '6,(iy+00)')),
  1928. ((0xfd, 0xcb, 0x00, 0x75), ('bit', '6,(iy+00)')),
  1929. ((0xfd, 0xcb, 0x00, 0x76), ('bit', '6,(iy+00)')),
  1930. ((0xfd, 0xcb, 0x00, 0x77), ('bit', '6,(iy+00)')),
  1931. ((0xfd, 0xcb, 0x00, 0x78), ('bit', '7,(iy+00)')),
  1932. ((0xfd, 0xcb, 0x00, 0x79), ('bit', '7,(iy+00)')),
  1933. ((0xfd, 0xcb, 0x00, 0x7a), ('bit', '7,(iy+00)')),
  1934. ((0xfd, 0xcb, 0x00, 0x7b), ('bit', '7,(iy+00)')),
  1935. ((0xfd, 0xcb, 0x00, 0x7c), ('bit', '7,(iy+00)')),
  1936. ((0xfd, 0xcb, 0x00, 0x7d), ('bit', '7,(iy+00)')),
  1937. ((0xfd, 0xcb, 0x00, 0x7e), ('bit', '7,(iy+00)')),
  1938. ((0xfd, 0xcb, 0x00, 0x7f), ('bit', '7,(iy+00)')),
  1939. ((0xfd, 0xcb, 0x00, 0x80), ('res', '0,(iy+00),b')),
  1940. ((0xfd, 0xcb, 0x00, 0x81), ('res', '0,(iy+00),c')),
  1941. ((0xfd, 0xcb, 0x00, 0x82), ('res', '0,(iy+00),d')),
  1942. ((0xfd, 0xcb, 0x00, 0x83), ('res', '0,(iy+00),e')),
  1943. ((0xfd, 0xcb, 0x00, 0x84), ('res', '0,(iy+00),h')),
  1944. ((0xfd, 0xcb, 0x00, 0x85), ('res', '0,(iy+00),l')),
  1945. ((0xfd, 0xcb, 0x00, 0x86), ('res', '0,(iy+00)')),
  1946. ((0xfd, 0xcb, 0x00, 0x87), ('res', '0,(iy+00),a')),
  1947. ((0xfd, 0xcb, 0x00, 0x88), ('res', '1,(iy+00),b')),
  1948. ((0xfd, 0xcb, 0x00, 0x89), ('res', '1,(iy+00),c')),
  1949. ((0xfd, 0xcb, 0x00, 0x8a), ('res', '1,(iy+00),d')),
  1950. ((0xfd, 0xcb, 0x00, 0x8b), ('res', '1,(iy+00),e')),
  1951. ((0xfd, 0xcb, 0x00, 0x8c), ('res', '1,(iy+00),h')),
  1952. ((0xfd, 0xcb, 0x00, 0x8d), ('res', '1,(iy+00),l')),
  1953. ((0xfd, 0xcb, 0x00, 0x8e), ('res', '1,(iy+00)')),
  1954. ((0xfd, 0xcb, 0x00, 0x8f), ('res', '1,(iy+00),a')),
  1955. ((0xfd, 0xcb, 0x00, 0x90), ('res', '2,(iy+00),b')),
  1956. ((0xfd, 0xcb, 0x00, 0x91), ('res', '2,(iy+00),c')),
  1957. ((0xfd, 0xcb, 0x00, 0x92), ('res', '2,(iy+00),d')),
  1958. ((0xfd, 0xcb, 0x00, 0x93), ('res', '2,(iy+00),e')),
  1959. ((0xfd, 0xcb, 0x00, 0x94), ('res', '2,(iy+00),h')),
  1960. ((0xfd, 0xcb, 0x00, 0x95), ('res', '2,(iy+00),l')),
  1961. ((0xfd, 0xcb, 0x00, 0x96), ('res', '2,(iy+00)')),
  1962. ((0xfd, 0xcb, 0x00, 0x97), ('res', '2,(iy+00),a')),
  1963. ((0xfd, 0xcb, 0x00, 0x98), ('res', '3,(iy+00),b')),
  1964. ((0xfd, 0xcb, 0x00, 0x99), ('res', '3,(iy+00),c')),
  1965. ((0xfd, 0xcb, 0x00, 0x9a), ('res', '3,(iy+00),d')),
  1966. ((0xfd, 0xcb, 0x00, 0x9b), ('res', '3,(iy+00),e')),
  1967. ((0xfd, 0xcb, 0x00, 0x9c), ('res', '3,(iy+00),h')),
  1968. ((0xfd, 0xcb, 0x00, 0x9d), ('res', '3,(iy+00),l')),
  1969. ((0xfd, 0xcb, 0x00, 0x9e), ('res', '3,(iy+00)')),
  1970. ((0xfd, 0xcb, 0x00, 0x9f), ('res', '3,(iy+00),a')),
  1971. ((0xfd, 0xcb, 0x00, 0xa0), ('res', '4,(iy+00),b')),
  1972. ((0xfd, 0xcb, 0x00, 0xa1), ('res', '4,(iy+00),c')),
  1973. ((0xfd, 0xcb, 0x00, 0xa2), ('res', '4,(iy+00),d')),
  1974. ((0xfd, 0xcb, 0x00, 0xa3), ('res', '4,(iy+00),e')),
  1975. ((0xfd, 0xcb, 0x00, 0xa4), ('res', '4,(iy+00),h')),
  1976. ((0xfd, 0xcb, 0x00, 0xa5), ('res', '4,(iy+00),l')),
  1977. ((0xfd, 0xcb, 0x00, 0xa6), ('res', '4,(iy+00)')),
  1978. ((0xfd, 0xcb, 0x00, 0xa7), ('res', '4,(iy+00),a')),
  1979. ((0xfd, 0xcb, 0x00, 0xa8), ('res', '5,(iy+00),b')),
  1980. ((0xfd, 0xcb, 0x00, 0xa9), ('res', '5,(iy+00),c')),
  1981. ((0xfd, 0xcb, 0x00, 0xaa), ('res', '5,(iy+00),d')),
  1982. ((0xfd, 0xcb, 0x00, 0xab), ('res', '5,(iy+00),e')),
  1983. ((0xfd, 0xcb, 0x00, 0xac), ('res', '5,(iy+00),h')),
  1984. ((0xfd, 0xcb, 0x00, 0xad), ('res', '5,(iy+00),l')),
  1985. ((0xfd, 0xcb, 0x00, 0xae), ('res', '5,(iy+00)')),
  1986. ((0xfd, 0xcb, 0x00, 0xaf), ('res', '5,(iy+00),a')),
  1987. ((0xfd, 0xcb, 0x00, 0xb0), ('res', '6,(iy+00),b')),
  1988. ((0xfd, 0xcb, 0x00, 0xb1), ('res', '6,(iy+00),c')),
  1989. ((0xfd, 0xcb, 0x00, 0xb2), ('res', '6,(iy+00),d')),
  1990. ((0xfd, 0xcb, 0x00, 0xb3), ('res', '6,(iy+00),e')),
  1991. ((0xfd, 0xcb, 0x00, 0xb4), ('res', '6,(iy+00),h')),
  1992. ((0xfd, 0xcb, 0x00, 0xb5), ('res', '6,(iy+00),l')),
  1993. ((0xfd, 0xcb, 0x00, 0xb6), ('res', '6,(iy+00)')),
  1994. ((0xfd, 0xcb, 0x00, 0xb7), ('res', '6,(iy+00),a')),
  1995. ((0xfd, 0xcb, 0x00, 0xb8), ('res', '7,(iy+00),b')),
  1996. ((0xfd, 0xcb, 0x00, 0xb9), ('res', '7,(iy+00),c')),
  1997. ((0xfd, 0xcb, 0x00, 0xba), ('res', '7,(iy+00),d')),
  1998. ((0xfd, 0xcb, 0x00, 0xbb), ('res', '7,(iy+00),e')),
  1999. ((0xfd, 0xcb, 0x00, 0xbc), ('res', '7,(iy+00),h')),
  2000. ((0xfd, 0xcb, 0x00, 0xbd), ('res', '7,(iy+00),l')),
  2001. ((0xfd, 0xcb, 0x00, 0xbe), ('res', '7,(iy+00)')),
  2002. ((0xfd, 0xcb, 0x00, 0xbf), ('res', '7,(iy+00),a')),
  2003. ((0xfd, 0xcb, 0x00, 0xc0), ('set', '0,(iy+00),b')),
  2004. ((0xfd, 0xcb, 0x00, 0xc1), ('set', '0,(iy+00),c')),
  2005. ((0xfd, 0xcb, 0x00, 0xc2), ('set', '0,(iy+00),d')),
  2006. ((0xfd, 0xcb, 0x00, 0xc3), ('set', '0,(iy+00),e')),
  2007. ((0xfd, 0xcb, 0x00, 0xc4), ('set', '0,(iy+00),h')),
  2008. ((0xfd, 0xcb, 0x00, 0xc5), ('set', '0,(iy+00),l')),
  2009. ((0xfd, 0xcb, 0x00, 0xc6), ('set', '0,(iy+00)')),
  2010. ((0xfd, 0xcb, 0x00, 0xc7), ('set', '0,(iy+00),a')),
  2011. ((0xfd, 0xcb, 0x00, 0xc8), ('set', '1,(iy+00),b')),
  2012. ((0xfd, 0xcb, 0x00, 0xc9), ('set', '1,(iy+00),c')),
  2013. ((0xfd, 0xcb, 0x00, 0xca), ('set', '1,(iy+00),d')),
  2014. ((0xfd, 0xcb, 0x00, 0xcb), ('set', '1,(iy+00),e')),
  2015. ((0xfd, 0xcb, 0x00, 0xcc), ('set', '1,(iy+00),h')),
  2016. ((0xfd, 0xcb, 0x00, 0xcd), ('set', '1,(iy+00),l')),
  2017. ((0xfd, 0xcb, 0x00, 0xce), ('set', '1,(iy+00)')),
  2018. ((0xfd, 0xcb, 0x00, 0xcf), ('set', '1,(iy+00),a')),
  2019. ((0xfd, 0xcb, 0x00, 0xd0), ('set', '2,(iy+00),b')),
  2020. ((0xfd, 0xcb, 0x00, 0xd1), ('set', '2,(iy+00),c')),
  2021. ((0xfd, 0xcb, 0x00, 0xd2), ('set', '2,(iy+00),d')),
  2022. ((0xfd, 0xcb, 0x00, 0xd3), ('set', '2,(iy+00),e')),
  2023. ((0xfd, 0xcb, 0x00, 0xd4), ('set', '2,(iy+00),h')),
  2024. ((0xfd, 0xcb, 0x00, 0xd5), ('set', '2,(iy+00),l')),
  2025. ((0xfd, 0xcb, 0x00, 0xd6), ('set', '2,(iy+00)')),
  2026. ((0xfd, 0xcb, 0x00, 0xd7), ('set', '2,(iy+00),a')),
  2027. ((0xfd, 0xcb, 0x00, 0xd8), ('set', '3,(iy+00),b')),
  2028. ((0xfd, 0xcb, 0x00, 0xd9), ('set', '3,(iy+00),c')),
  2029. ((0xfd, 0xcb, 0x00, 0xda), ('set', '3,(iy+00),d')),
  2030. ((0xfd, 0xcb, 0x00, 0xdb), ('set', '3,(iy+00),e')),
  2031. ((0xfd, 0xcb, 0x00, 0xdc), ('set', '3,(iy+00),h')),
  2032. ((0xfd, 0xcb, 0x00, 0xdd), ('set', '3,(iy+00),l')),
  2033. ((0xfd, 0xcb, 0x00, 0xde), ('set', '3,(iy+00)')),
  2034. ((0xfd, 0xcb, 0x00, 0xdf), ('set', '3,(iy+00),a')),
  2035. ((0xfd, 0xcb, 0x00, 0xe0), ('set', '4,(iy+00),b')),
  2036. ((0xfd, 0xcb, 0x00, 0xe1), ('set', '4,(iy+00),c')),
  2037. ((0xfd, 0xcb, 0x00, 0xe2), ('set', '4,(iy+00),d')),
  2038. ((0xfd, 0xcb, 0x00, 0xe3), ('set', '4,(iy+00),e')),
  2039. ((0xfd, 0xcb, 0x00, 0xe4), ('set', '4,(iy+00),h')),
  2040. ((0xfd, 0xcb, 0x00, 0xe5), ('set', '4,(iy+00),l')),
  2041. ((0xfd, 0xcb, 0x00, 0xe6), ('set', '4,(iy+00)')),
  2042. ((0xfd, 0xcb, 0x00, 0xe7), ('set', '4,(iy+00),a')),
  2043. ((0xfd, 0xcb, 0x00, 0xe8), ('set', '5,(iy+00),b')),
  2044. ((0xfd, 0xcb, 0x00, 0xe9), ('set', '5,(iy+00),c')),
  2045. ((0xfd, 0xcb, 0x00, 0xea), ('set', '5,(iy+00),d')),
  2046. ((0xfd, 0xcb, 0x00, 0xeb), ('set', '5,(iy+00),e')),
  2047. ((0xfd, 0xcb, 0x00, 0xec), ('set', '5,(iy+00),h')),
  2048. ((0xfd, 0xcb, 0x00, 0xed), ('set', '5,(iy+00),l')),
  2049. ((0xfd, 0xcb, 0x00, 0xee), ('set', '5,(iy+00)')),
  2050. ((0xfd, 0xcb, 0x00, 0xef), ('set', '5,(iy+00),a')),
  2051. ((0xfd, 0xcb, 0x00, 0xf0), ('set', '6,(iy+00),b')),
  2052. ((0xfd, 0xcb, 0x00, 0xf1), ('set', '6,(iy+00),c')),
  2053. ((0xfd, 0xcb, 0x00, 0xf2), ('set', '6,(iy+00),d')),
  2054. ((0xfd, 0xcb, 0x00, 0xf3), ('set', '6,(iy+00),e')),
  2055. ((0xfd, 0xcb, 0x00, 0xf4), ('set', '6,(iy+00),h')),
  2056. ((0xfd, 0xcb, 0x00, 0xf5), ('set', '6,(iy+00),l')),
  2057. ((0xfd, 0xcb, 0x00, 0xf6), ('set', '6,(iy+00)')),
  2058. ((0xfd, 0xcb, 0x00, 0xf7), ('set', '6,(iy+00),a')),
  2059. ((0xfd, 0xcb, 0x00, 0xf8), ('set', '7,(iy+00),b')),
  2060. ((0xfd, 0xcb, 0x00, 0xf9), ('set', '7,(iy+00),c')),
  2061. ((0xfd, 0xcb, 0x00, 0xfa), ('set', '7,(iy+00),d')),
  2062. ((0xfd, 0xcb, 0x00, 0xfb), ('set', '7,(iy+00),e')),
  2063. ((0xfd, 0xcb, 0x00, 0xfc), ('set', '7,(iy+00),h')),
  2064. ((0xfd, 0xcb, 0x00, 0xfd), ('set', '7,(iy+00),l')),
  2065. ((0xfd, 0xcb, 0x00, 0xfe), ('set', '7,(iy+00)')),
  2066. ((0xfd, 0xcb, 0x00, 0xff), ('set', '7,(iy+00),a')),
  2067. ((0xfd, 0xe1), ('pop', 'iy')),
  2068. ((0xfd, 0xe3), ('ex', '(sp),iy')),
  2069. ((0xfd, 0xe5), ('push', 'iy')),
  2070. ((0xfd, 0xe9), ('jp', 'iy')),
  2071. ((0xfd, 0xf9), ('ld', 'sp,iy')),
  2072. ((0xfe, 0x00), ('cp', '00')),
  2073. ((0xff,), ('rst', '38')),
  2074. )
  2075. mem = memory.ram(8)
  2076. for data, decode in tests:
  2077. mem.load(0, data)
  2078. if len(decode) != 3:
  2079. decode = list(decode)
  2080. decode.append(len(data))
  2081. decode = tuple(decode)
  2082. self.assertEqual(disassemble(mem, 0), decode)
  2083. #-----------------------------------------------------------------------------
  2084. if __name__ == "__main__":
  2085. unittest.main()
  2086. #-----------------------------------------------------------------------------