An emulator, assembler, and disassembler for the Sega Game Gear
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

instructions.yml 23 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945
  1. # Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
  2. # Released under the terms of the MIT License. See LICENSE for details.
  3. # *** ASM Instruction Description File ***
  4. # This file is used to generate 'instructions.inc.c'.
  5. # `make` should trigger a rebuild when this file is modified; if not, use:
  6. # `python scripts/update_asm_instructions.py`.
  7. ---
  8. adc:
  9. args: yes
  10. cases:
  11. - type: [register, register]
  12. cases:
  13. - cond: [a, a]
  14. return: [0x8F]
  15. - cond: [a, b]
  16. return: [0x88]
  17. - cond: [a, c]
  18. return: [0x89]
  19. - cond: [a, d]
  20. return: [0x8A]
  21. - cond: [a, e]
  22. return: [0x8B]
  23. - cond: [a, h|ih]
  24. return: [0x8C]
  25. - cond: [a, l|il]
  26. return: [0x8D]
  27. - cond: [hl, bc]
  28. return: [0xED, 0x4A]
  29. - cond: [hl, de]
  30. return: [0xED, 0x5A]
  31. - cond: [hl, hl]
  32. return: [0xED, 0x6A]
  33. - cond: [hl, sp]
  34. return: [0xED, 0x7A]
  35. - type: [register, immediate]
  36. cases:
  37. - cond: [a, u8]
  38. return: [0xCE, u8]
  39. - type: [register, indirect_hl_or_indexed]
  40. cases:
  41. - cond: [a, _]
  42. return: [0x8E]
  43. add:
  44. args: yes
  45. cases:
  46. - type: [register, register]
  47. cases:
  48. - cond: [a, a]
  49. return: [0x87]
  50. - cond: [a, b]
  51. return: [0x80]
  52. - cond: [a, c]
  53. return: [0x81]
  54. - cond: [a, d]
  55. return: [0x82]
  56. - cond: [a, e]
  57. return: [0x83]
  58. - cond: [a, h|ih]
  59. return: [0x84]
  60. - cond: [a, l|il]
  61. return: [0x85]
  62. - cond: [hl|i, bc]
  63. return: [0x09]
  64. - cond: [hl|i, de]
  65. return: [0x19]
  66. - cond: [hl|i, hl|i]
  67. return: [0x29]
  68. - cond: [hl|i, sp]
  69. return: [0x39]
  70. - type: [register, immediate]
  71. cases:
  72. - cond: [a, u8]
  73. return: [0xC6, u8]
  74. - type: [register, indirect_hl_or_indexed]
  75. cases:
  76. - cond: [a, _]
  77. return: [0x86]
  78. and:
  79. args: yes
  80. cases:
  81. - type: [register]
  82. cases:
  83. - cond: [a]
  84. return: [0xA7]
  85. - cond: [b]
  86. return: [0xA0]
  87. - cond: [c]
  88. return: [0xA1]
  89. - cond: [d]
  90. return: [0xA2]
  91. - cond: [e]
  92. return: [0xA3]
  93. - cond: [h|ih]
  94. return: [0xA4]
  95. - cond: [l|il]
  96. return: [0xA5]
  97. - type: [immediate]
  98. cases:
  99. - cond: [u8]
  100. return: [0xE6, u8]
  101. - type: [indirect_hl_or_indexed]
  102. cases:
  103. - cond: [_]
  104. return: [0xA6]
  105. bit:
  106. args: yes
  107. cases:
  108. - type: [immediate, register]
  109. cases:
  110. - cond: [bit.0, a]
  111. return: [0xCB, 0x47]
  112. - cond: [bit.0, b]
  113. return: [0xCB, 0x40]
  114. - cond: [bit.0, c]
  115. return: [0xCB, 0x41]
  116. - cond: [bit.0, d]
  117. return: [0xCB, 0x42]
  118. - cond: [bit.0, e]
  119. return: [0xCB, 0x43]
  120. - cond: [bit.0, h]
  121. return: [0xCB, 0x44]
  122. - cond: [bit.0, l]
  123. return: [0xCB, 0x45]
  124. - cond: [bit.1, a]
  125. return: [0xCB, 0x4F]
  126. - cond: [bit.1, b]
  127. return: [0xCB, 0x48]
  128. - cond: [bit.1, c]
  129. return: [0xCB, 0x49]
  130. - cond: [bit.1, d]
  131. return: [0xCB, 0x4A]
  132. - cond: [bit.1, e]
  133. return: [0xCB, 0x4B]
  134. - cond: [bit.1, h]
  135. return: [0xCB, 0x4C]
  136. - cond: [bit.1, l]
  137. return: [0xCB, 0x4D]
  138. - cond: [bit.2, a]
  139. return: [0xCB, 0x57]
  140. - cond: [bit.2, b]
  141. return: [0xCB, 0x50]
  142. - cond: [bit.2, c]
  143. return: [0xCB, 0x51]
  144. - cond: [bit.2, d]
  145. return: [0xCB, 0x52]
  146. - cond: [bit.2, e]
  147. return: [0xCB, 0x53]
  148. - cond: [bit.2, h]
  149. return: [0xCB, 0x54]
  150. - cond: [bit.2, l]
  151. return: [0xCB, 0x55]
  152. - cond: [bit.3, a]
  153. return: [0xCB, 0x5F]
  154. - cond: [bit.3, b]
  155. return: [0xCB, 0x58]
  156. - cond: [bit.3, c]
  157. return: [0xCB, 0x59]
  158. - cond: [bit.3, d]
  159. return: [0xCB, 0x5A]
  160. - cond: [bit.3, e]
  161. return: [0xCB, 0x5B]
  162. - cond: [bit.3, h]
  163. return: [0xCB, 0x5C]
  164. - cond: [bit.3, l]
  165. return: [0xCB, 0x5D]
  166. - cond: [bit.4, a]
  167. return: [0xCB, 0x67]
  168. - cond: [bit.4, b]
  169. return: [0xCB, 0x60]
  170. - cond: [bit.4, c]
  171. return: [0xCB, 0x61]
  172. - cond: [bit.4, d]
  173. return: [0xCB, 0x62]
  174. - cond: [bit.4, e]
  175. return: [0xCB, 0x63]
  176. - cond: [bit.4, h]
  177. return: [0xCB, 0x64]
  178. - cond: [bit.4, l]
  179. return: [0xCB, 0x65]
  180. - cond: [bit.5, a]
  181. return: [0xCB, 0x6F]
  182. - cond: [bit.5, b]
  183. return: [0xCB, 0x68]
  184. - cond: [bit.5, c]
  185. return: [0xCB, 0x69]
  186. - cond: [bit.5, d]
  187. return: [0xCB, 0x6A]
  188. - cond: [bit.5, e]
  189. return: [0xCB, 0x6B]
  190. - cond: [bit.5, h]
  191. return: [0xCB, 0x6C]
  192. - cond: [bit.5, l]
  193. return: [0xCB, 0x6D]
  194. - cond: [bit.6, a]
  195. return: [0xCB, 0x77]
  196. - cond: [bit.6, b]
  197. return: [0xCB, 0x70]
  198. - cond: [bit.6, c]
  199. return: [0xCB, 0x71]
  200. - cond: [bit.6, d]
  201. return: [0xCB, 0x72]
  202. - cond: [bit.6, e]
  203. return: [0xCB, 0x73]
  204. - cond: [bit.6, h]
  205. return: [0xCB, 0x74]
  206. - cond: [bit.6, l]
  207. return: [0xCB, 0x75]
  208. - cond: [bit.7, a]
  209. return: [0xCB, 0x7F]
  210. - cond: [bit.7, b]
  211. return: [0xCB, 0x78]
  212. - cond: [bit.7, c]
  213. return: [0xCB, 0x79]
  214. - cond: [bit.7, d]
  215. return: [0xCB, 0x7A]
  216. - cond: [bit.7, e]
  217. return: [0xCB, 0x7B]
  218. - cond: [bit.7, h]
  219. return: [0xCB, 0x7C]
  220. - cond: [bit.7, l]
  221. return: [0xCB, 0x7D]
  222. - type: [immediate, indirect_hl_or_indexed]
  223. cases:
  224. - cond: [bit.0, _]
  225. return: [0xCB, 0x46]
  226. - cond: [bit.1, _]
  227. return: [0xCB, 0x4E]
  228. - cond: [bit.2, _]
  229. return: [0xCB, 0x56]
  230. - cond: [bit.3, _]
  231. return: [0xCB, 0x5E]
  232. - cond: [bit.4, _]
  233. return: [0xCB, 0x66]
  234. - cond: [bit.5, _]
  235. return: [0xCB, 0x6E]
  236. - cond: [bit.6, _]
  237. return: [0xCB, 0x76]
  238. - cond: [bit.7, _]
  239. return: [0xCB, 0x7E]
  240. call:
  241. args: yes
  242. cases:
  243. - type: [immediate]
  244. cases:
  245. - cond: [u16]
  246. return: [0xCD, u16]
  247. - type: [condition, immediate]
  248. cases:
  249. - cond: [nz, u16]
  250. return: [0xC4, u16]
  251. - cond: [z, u16]
  252. return: [0xCC, u16]
  253. - cond: [nc, u16]
  254. return: [0xD4, u16]
  255. - cond: [c, u16]
  256. return: [0xDC, u16]
  257. - cond: [po, u16]
  258. return: [0xE4, u16]
  259. - cond: [pe, u16]
  260. return: [0xEC, u16]
  261. - cond: [p, u16]
  262. return: [0xF4, u16]
  263. - cond: [m, u16]
  264. return: [0xFC, u16]
  265. ccf:
  266. args: no
  267. return: [0x3F]
  268. cp:
  269. args: yes
  270. cases:
  271. - type: [register]
  272. cases:
  273. - cond: [a]
  274. return: [0xBF]
  275. - cond: [b]
  276. return: [0xB8]
  277. - cond: [c]
  278. return: [0xB9]
  279. - cond: [d]
  280. return: [0xBA]
  281. - cond: [e]
  282. return: [0xBB]
  283. - cond: [h|ih]
  284. return: [0xBC]
  285. - cond: [l|il]
  286. return: [0xBD]
  287. - type: [indirect_hl_or_indexed]
  288. cases:
  289. - cond: [_]
  290. return: [0xBE]
  291. - type: [immediate]
  292. cases:
  293. - cond: [u8]
  294. return: [0xFE, u8]
  295. cpd:
  296. args: no
  297. return: [0xED, 0xA9]
  298. cpdr:
  299. args: no
  300. return: [0xED, 0xB9]
  301. cpi:
  302. args: no
  303. return: [0xED, 0xA1]
  304. cpir:
  305. args: no
  306. return: [0xED, 0xB1]
  307. cpl:
  308. args: no
  309. return: [0x2F]
  310. daa:
  311. args: no
  312. return: [0x27]
  313. dec:
  314. args: yes
  315. cases:
  316. - type: [register]
  317. cases:
  318. - cond: [a]
  319. return: [0x3D]
  320. - cond: [b]
  321. return: [0x05]
  322. - cond: [c]
  323. return: [0x0D]
  324. - cond: [d]
  325. return: [0x15]
  326. - cond: [e]
  327. return: [0x1D]
  328. - cond: [h|ih]
  329. return: [0x25]
  330. - cond: [l|il]
  331. return: [0x2D]
  332. - cond: [bc]
  333. return: [0x0B]
  334. - cond: [de]
  335. return: [0x1B]
  336. - cond: [hl|i]
  337. return: [0x2B]
  338. - cond: [sp]
  339. return: [0x3B]
  340. - type: [indirect_hl_or_indexed]
  341. cases:
  342. - cond: [_]
  343. return: [0x35]
  344. di:
  345. args: no
  346. return: [0xF3]
  347. djnz:
  348. args: yes
  349. cases:
  350. - type: [immediate]
  351. cases:
  352. - cond: [rel]
  353. return: [0x10, rel]
  354. ei:
  355. args: no
  356. return: [0xFB]
  357. ex:
  358. args: yes
  359. cases:
  360. - type: [register, register]
  361. cases:
  362. - cond: [af, af_]
  363. return: [0x08]
  364. - cond: [de, hl]
  365. return: [0xEB]
  366. - type: [indirect, register]
  367. cases:
  368. - cond: [reg.sp, hl|i]
  369. return: [0xE3]
  370. exx:
  371. args: no
  372. return: [0xD9]
  373. halt:
  374. args: no
  375. return: [0x76]
  376. im:
  377. args: yes
  378. cases:
  379. - type: [immediate]
  380. cases:
  381. - cond: [im.0]
  382. return: [0xED, 0x46]
  383. - cond: [im.1]
  384. return: [0xED, 0x56]
  385. - cond: [im.2]
  386. return: [0xED, 0x5E]
  387. in:
  388. args: yes
  389. cases:
  390. - type: [register, port]
  391. cases:
  392. - cond: [a, imm]
  393. return: [0xDB, u8]
  394. - cond: [a, reg.c]
  395. return: [0xED, 0x78]
  396. - cond: [b, reg.c]
  397. return: [0xED, 0x40]
  398. - cond: [c, reg.c]
  399. return: [0xED, 0x48]
  400. - cond: [d, reg.c]
  401. return: [0xED, 0x50]
  402. - cond: [e, reg.c]
  403. return: [0xED, 0x58]
  404. - cond: [h, reg.c]
  405. return: [0xED, 0x60]
  406. - cond: [l, reg.c]
  407. return: [0xED, 0x68]
  408. - type: [port]
  409. cases:
  410. - cond: [reg.c]
  411. return: [0xED, 0x70]
  412. inc:
  413. args: yes
  414. cases:
  415. - type: [register]
  416. cases:
  417. - cond: [a]
  418. return: [0x3C]
  419. - cond: [b]
  420. return: [0x04]
  421. - cond: [c]
  422. return: [0x0C]
  423. - cond: [d]
  424. return: [0x14]
  425. - cond: [e]
  426. return: [0x1C]
  427. - cond: [h|ih]
  428. return: [0x24]
  429. - cond: [l|il]
  430. return: [0x2C]
  431. - cond: [bc]
  432. return: [0x03]
  433. - cond: [de]
  434. return: [0x13]
  435. - cond: [hl|i]
  436. return: [0x23]
  437. - cond: [sp]
  438. return: [0x33]
  439. - type: [indirect_hl_or_indexed]
  440. cases:
  441. - cond: [_]
  442. return: [0x34]
  443. ind:
  444. args: no
  445. return: [0xED, 0xAA]
  446. indr:
  447. args: no
  448. return: [0xED, 0xBA]
  449. ini:
  450. args: no
  451. return: [0xED, 0xA2]
  452. inir:
  453. args: no
  454. return: [0xED, 0xB2]
  455. jp:
  456. args: yes
  457. cases:
  458. - type: [immediate]
  459. cases:
  460. - cond: [u16]
  461. return: [0xC3, u16]
  462. - type: [condition, immediate]
  463. cases:
  464. - cond: [nz, u16]
  465. return: [0xC2, u16]
  466. - cond: [z, u16]
  467. return: [0xCA, u16]
  468. - cond: [nc, u16]
  469. return: [0xD2, u16]
  470. - cond: [c, u16]
  471. return: [0xDA, u16]
  472. - cond: [po, u16]
  473. return: [0xE2, u16]
  474. - cond: [pe, u16]
  475. return: [0xEA, u16]
  476. - cond: [p, u16]
  477. return: [0xF2, u16]
  478. - cond: [m, u16]
  479. return: [0xFA, u16]
  480. - type: [indirect_hl_or_indexed]
  481. cases:
  482. - cond: [_]
  483. return: [0xE9]
  484. jr:
  485. args: yes
  486. cases:
  487. - type: [immediate]
  488. cases:
  489. - cond: [rel]
  490. return: [0x18, rel]
  491. - type: [condition, immediate]
  492. cases:
  493. - cond: [nz, rel]
  494. return: [0x20, rel]
  495. - cond: [z, rel]
  496. return: [0x28, rel]
  497. - cond: [nc, rel]
  498. return: [0x30, rel]
  499. - cond: [c, rel]
  500. return: [0x38, rel]
  501. ld:
  502. args: yes
  503. cases:
  504. - type: [register, register]
  505. cases:
  506. - cond: [a, a]
  507. return: [0x7F]
  508. - cond: [a, b]
  509. return: [0x78]
  510. - cond: [a, c]
  511. return: [0x79]
  512. - cond: [a, d]
  513. return: [0x7A]
  514. - cond: [a, e]
  515. return: [0x7B]
  516. - cond: [a, h|ih]
  517. return: [0x7C]
  518. - cond: [a, l|il]
  519. return: [0x7D]
  520. - cond: [b, a]
  521. return: [0x47]
  522. - cond: [b, b]
  523. return: [0x40]
  524. - cond: [b, c]
  525. return: [0x41]
  526. - cond: [b, d]
  527. return: [0x42]
  528. - cond: [b, e]
  529. return: [0x43]
  530. - cond: [b, h|ih]
  531. return: [0x44]
  532. - cond: [b, l|il]
  533. return: [0x45]
  534. - cond: [c, a]
  535. return: [0x4F]
  536. - cond: [c, b]
  537. return: [0x48]
  538. - cond: [c, c]
  539. return: [0x49]
  540. - cond: [c, d]
  541. return: [0x4A]
  542. - cond: [c, e]
  543. return: [0x4B]
  544. - cond: [c, h|ih]
  545. return: [0x4C]
  546. - cond: [c, l|il]
  547. return: [0x4D]
  548. - cond: [d, a]
  549. return: [0x57]
  550. - cond: [d, b]
  551. return: [0x50]
  552. - cond: [d, c]
  553. return: [0x51]
  554. - cond: [d, d]
  555. return: [0x52]
  556. - cond: [d, e]
  557. return: [0x53]
  558. - cond: [d, h|ih]
  559. return: [0x54]
  560. - cond: [d, l|il]
  561. return: [0x55]
  562. - cond: [e, a]
  563. return: [0x5F]
  564. - cond: [e, b]
  565. return: [0x58]
  566. - cond: [e, c]
  567. return: [0x59]
  568. - cond: [e, d]
  569. return: [0x5A]
  570. - cond: [e, e]
  571. return: [0x5B]
  572. - cond: [e, h|ih]
  573. return: [0x5C]
  574. - cond: [e, l|il]
  575. return: [0x5D]
  576. - cond: [h|ih, a]
  577. return: [0x67]
  578. - cond: [h|ih, b]
  579. return: [0x60]
  580. - cond: [h|ih, c]
  581. return: [0x61]
  582. - cond: [h|ih, d]
  583. return: [0x62]
  584. - cond: [h|ih, e]
  585. return: [0x63]
  586. - cond: [h|ih, h|ih]
  587. return: [0x64]
  588. - cond: [h|ih, l|il]
  589. return: [0x65]
  590. - cond: [l|il, a]
  591. return: [0x6F]
  592. - cond: [l|il, b]
  593. return: [0x68]
  594. - cond: [l|il, c]
  595. return: [0x69]
  596. - cond: [l|il, d]
  597. return: [0x6A]
  598. - cond: [l|il, e]
  599. return: [0x6B]
  600. - cond: [l|il, h|ih]
  601. return: [0x6C]
  602. - cond: [l|il, l|il]
  603. return: [0x6D]
  604. - cond: [a, i]
  605. return: [0xED, 0x57]
  606. - cond: [i, a]
  607. return: [0xED, 0x47]
  608. - cond: [a, r]
  609. return: [0xED, 0x5F]
  610. - cond: [r, a]
  611. return: [0xED, 0x4F]
  612. - cond: [sp, hl|i]
  613. return: [0xF9]
  614. - type: [register, immediate]
  615. cases:
  616. - cond: [a, u8]
  617. return: [0x3E, u8]
  618. - cond: [b, u8]
  619. return: [0x06, u8]
  620. - cond: [c, u8]
  621. return: [0x0E, u8]
  622. - cond: [d, u8]
  623. return: [0x16, u8]
  624. - cond: [e, u8]
  625. return: [0x1E, u8]
  626. - cond: [h|ih, u8]
  627. return: [0x26, u8]
  628. - cond: [l|il, u8]
  629. return: [0x2E, u8]
  630. - cond: [bc, u16]
  631. return: [0x01, u16]
  632. - cond: [de, u16]
  633. return: [0x11, u16]
  634. - cond: [hl|i, u16]
  635. return: [0x21, u16]
  636. - cond: [sp, u16]
  637. return: [0x31, u16]
  638. - type: [register, indirect_hl_or_indexed]
  639. cases:
  640. - cond: [a, _]
  641. return: [0x7E]
  642. - cond: [b, _]
  643. return: [0x46]
  644. - cond: [c, _]
  645. return: [0x4E]
  646. - cond: [d, _]
  647. return: [0x56]
  648. - cond: [e, _]
  649. return: [0x5E]
  650. - cond: [h, _]
  651. return: [0x66]
  652. - cond: [l, _]
  653. return: [0x6E]
  654. - type: [register, indirect]
  655. cases:
  656. - cond: [a, reg.bc]
  657. return: [0x0A]
  658. - cond: [a, reg.de]
  659. return: [0x1A]
  660. - cond: [hl|i, imm]
  661. return: [0x2A, u16]
  662. - cond: [a, imm]
  663. return: [0x3A, u16]
  664. - cond: [bc, imm]
  665. return: [0xED, 0x4B, u16]
  666. - cond: [de, imm]
  667. return: [0xED, 0x5B, u16]
  668. - cond: [sp, imm]
  669. return: [0xED, 0x7B, u16]
  670. - type: [indirect_hl_or_indexed, register]
  671. cases:
  672. - cond: [_, a]
  673. return: [0x77]
  674. - cond: [_, b]
  675. return: [0x70]
  676. - cond: [_, c]
  677. return: [0x71]
  678. - cond: [_, d]
  679. return: [0x72]
  680. - cond: [_, e]
  681. return: [0x73]
  682. - cond: [_, h]
  683. return: [0x74]
  684. - cond: [_, l]
  685. return: [0x75]
  686. - type: [indirect_hl_or_indexed, immediate]
  687. cases:
  688. - cond: [_, u8]
  689. return: [0x36, u8]
  690. - type: [indirect, register]
  691. cases:
  692. - cond: [reg.bc, a]
  693. return: [0x02]
  694. - cond: [reg.de, a]
  695. return: [0x12]
  696. - cond: [imm, hl|i]
  697. return: [0x22, u16]
  698. - cond: [imm, a]
  699. return: [0x32, u16]
  700. - cond: [imm, bc]
  701. return: [0xED, 0x43, u16]
  702. - cond: [imm, de]
  703. return: [0xED, 0x53, u16]
  704. - cond: [imm, sp]
  705. return: [0xED, 0x73, u16]
  706. ldd:
  707. args: no
  708. return: [0xED, 0xA8]
  709. lddr:
  710. args: no
  711. return: [0xED, 0xB8]
  712. ldi:
  713. args: no
  714. return: [0xED, 0xA0]
  715. ldir:
  716. args: no
  717. return: [0xED, 0xB0]
  718. neg:
  719. args: no
  720. return: [0xED, 0x44]
  721. nop:
  722. args: no
  723. return: [0x00]
  724. or:
  725. args: yes
  726. cases:
  727. - type: [register]
  728. cases:
  729. - cond: [a]
  730. return: [0xB7]
  731. - cond: [b]
  732. return: [0xB0]
  733. - cond: [c]
  734. return: [0xB1]
  735. - cond: [d]
  736. return: [0xB2]
  737. - cond: [e]
  738. return: [0xB3]
  739. - cond: [h|ih]
  740. return: [0xB4]
  741. - cond: [l|il]
  742. return: [0xB5]
  743. - type: [immediate]
  744. cases:
  745. - cond: [u8]
  746. return: [0xF6, u8]
  747. - type: [indirect_hl_or_indexed]
  748. cases:
  749. - cond: [_]
  750. return: [0xB6]
  751. otdr:
  752. args: no
  753. return: [0xED, 0xBB]
  754. otir:
  755. args: no
  756. return: [0xED, 0xB3]
  757. out:
  758. args: yes
  759. cases:
  760. - type: [port, register]
  761. cases:
  762. - cond: [imm, a]
  763. return: [0xD3, u8]
  764. - cond: [reg.c, a]
  765. return: [0xED, 0x79]
  766. - cond: [reg.c, b]
  767. return: [0xED, 0x41]
  768. - cond: [reg.c, c]
  769. return: [0xED, 0x49]
  770. - cond: [reg.c, d]
  771. return: [0xED, 0x51]
  772. - cond: [reg.c, e]
  773. return: [0xED, 0x59]
  774. - cond: [reg.c, h]
  775. return: [0xED, 0x61]
  776. - cond: [reg.c, l]
  777. return: [0xED, 0x69]
  778. - type: [port, immediate]
  779. cases:
  780. - cond: [reg.c, u8.0]
  781. return: [0xED, 0x71]
  782. outd:
  783. args: no
  784. return: [0xED, 0xAB]
  785. outi:
  786. args: no
  787. return: [0xED, 0xA3]
  788. # pop:
  789. # args: yes
  790. # return: TODO
  791. # push:
  792. # args: yes
  793. # return: TODO
  794. # res:
  795. # args: yes
  796. # return: TODO
  797. # ret:
  798. # args: yes
  799. # return: TODO
  800. reti:
  801. args: no
  802. return: [0xED, 0x4D]
  803. retn:
  804. args: no
  805. return: [0xED, 0x45]
  806. # rl:
  807. # args: yes
  808. # return: TODO
  809. rla:
  810. args: no
  811. return: [0x17]
  812. # rlc:
  813. # args: yes
  814. # return: TODO
  815. rlca:
  816. args: no
  817. return: [0x07]
  818. rld:
  819. args: no
  820. return: [0xED, 0x6F]
  821. # rr:
  822. # args: yes
  823. # return: TODO
  824. rra:
  825. args: no
  826. return: [0x1F]
  827. # rrc:
  828. # args: yes
  829. # return: TODO
  830. rrca:
  831. args: no
  832. return: [0x0F]
  833. # rrd:
  834. # args: yes
  835. # return: TODO
  836. # rst:
  837. # args: yes
  838. # return: TODO
  839. # sbc:
  840. # args: yes
  841. # return: TODO
  842. scf:
  843. args: no
  844. return: [0x37]
  845. # set:
  846. # args: yes
  847. # return: TODO
  848. # sl1:
  849. # args: yes
  850. # return: TODO
  851. # sla:
  852. # args: yes
  853. # return: TODO
  854. # sll:
  855. # args: yes
  856. # return: TODO
  857. # sls:
  858. # args: yes
  859. # return: TODO
  860. # sra:
  861. # args: yes
  862. # return: TODO
  863. # srl:
  864. # args: yes
  865. # return: TODO
  866. # sub:
  867. # args: yes
  868. # return: TODO
  869. # xor:
  870. # args: yes
  871. # return: TODO