Posted By

Zufolek on 11/01/09


Tagged


Versions (?)

6502 Instruction Set


 / Published in: C
 

May contain mistakes.

Suffix: ac=accumulator im=immediate zp=zero page zx=zero page,x ab=absolute ax=absolute,x ay=absolute,y ix=indirect,x iy=indirect,y

  1. enum{
  2. BRK_,//0
  3. ORA_IX,
  4. JAM_,
  5. SLO_IX,
  6. NOP_ZP,
  7. ORA_ZP,
  8. ASL_ZP,
  9. SLO_ZP,
  10. PHP_,
  11. ORA_IM,
  12. ASL_AC,
  13. ANC_IM,
  14. NOP_AB,
  15. ORA_AB,
  16. ASL_AB,
  17. SLO_AB,
  18.  
  19.  
  20. BPL_,//1
  21. ORA_IY,
  22. JAM_2,
  23. SLO_IY,
  24. NOP_ZX,
  25. ORA_ZX,
  26. ASL_ZX,
  27. SLO_ZX,
  28. CLC_,
  29. ORA_AY,
  30. NOP_2,
  31. SLO_AY,
  32. NOP_AX,
  33. ORA_AX,
  34. ASL_AX,
  35. SLO_AX,
  36.  
  37. JSR_AB,//2
  38. AND_IX,
  39. JAM_3,
  40. RLA_IX,
  41. BIT_ZP,
  42. AND_ZP,
  43. ROL_ZP,
  44. RLA_ZP,
  45. PLP_,
  46. AND_IM,
  47. ROL_AC,
  48. ANC_IM2,
  49. BIT_AB,
  50. AND_AB,
  51. ROL_AB,
  52. RLA_AB,
  53.  
  54. BMI_,//3
  55. AND_IY,
  56. JAM_4,
  57. RLA_IY,
  58. NOP_ZX2,
  59. AND_ZX,
  60. ROL_ZX,
  61. RLA_ZX,
  62. SEC_,
  63. AND_AY,
  64. NOP_3,
  65. RLA_AY,
  66. NOP_AX2,
  67. AND_AX,
  68. ROL_AX,
  69. RLA_AX,
  70.  
  71. RTI_,//4
  72. EOR_IX,
  73. JAM_5,
  74. SRE_IX,
  75. NOP_ZP2,
  76. EOR_ZP,
  77. LSR_ZP,
  78. SRE_ZP,
  79. PHA_,
  80. EOR_IM,
  81. LSR_AC,
  82. ASR_IM,
  83. JMP_AB,
  84. EOR_AB,
  85. LSR_AB,
  86. SRE_AB,
  87.  
  88. BVC_,//5
  89. EOR_IY,
  90. JAM_6,
  91. SRE_IY,
  92. NOP_ZX3,
  93. EOR_ZX,
  94. LSR_ZX,
  95. SRE_ZX,
  96. CLI_,
  97. EOR_AY,
  98. NOP_4,
  99. SRE_AY,
  100. NOP_AX3,
  101. EOR_AX,
  102. LSR_AX,
  103. SRE_AX,
  104.  
  105. RTS_,//6
  106. ADC_IX,
  107. JAM_7,
  108. RRA_IX,
  109. NOP_ZP3,
  110. ADC_ZP,
  111. ROR_ZP,
  112. RRA_ZP,
  113. PLA_,
  114. ADC_IM,
  115. ROR_AC,
  116. ARR_IM,
  117. JMP_IN,
  118. ADC_AB,
  119. ROR_AB,
  120. RRA_AB,
  121.  
  122. BVS_,//7
  123. ADC_IY,
  124. JAM_8,
  125. RRA_IY,
  126. NOP_ZX4,
  127. ADC_ZX,
  128. ROR_ZX,
  129. RRA_ZX,
  130. SEI_,
  131. ADC_AY,
  132. NOP_5,
  133. RRA_AY,
  134. NOP_AX4,
  135. ADC_AX,
  136. ROR_AX,
  137. RRA_AX,
  138.  
  139. NOP_IM,//8
  140. STA_IX,
  141. NOP_IM2,
  142. SAX_IX,
  143. STY_ZP,
  144. STA_ZP,
  145. STX_ZP,
  146. SAX_ZP,
  147. DEY_,
  148. NOP_IM3,
  149. TXA_,
  150. ANE_IM,
  151. STY_AB,
  152. STA_AB,
  153. STX_AB,
  154. SAX_AB,
  155.  
  156. BCC_,//9
  157. STA_IY,
  158. JAM_9,
  159. SHA_IY,
  160. STY_ZX,
  161. STA_ZX,
  162. STX_ZX,
  163. SAX_ZY,
  164. TYA_,
  165. STA_AY,
  166. TXS_,
  167. SHS_AY,
  168. SHY_AX,
  169. STA_AX,
  170. SHX_AY,
  171. SHA_AY,
  172.  
  173. LDY_IM,//a
  174. LDA_IX,
  175. LDX_IM,
  176. LAX_IX,
  177. LDY_ZP,
  178. LDA_ZP,
  179. LDX_ZP,
  180. LAX_ZP,
  181. TAY_,
  182. LDA_IM,
  183. TAX_,
  184. LXA_IM,
  185. LDY_AB,
  186. LDA_AB,
  187. LDX_AB,
  188. LAX_AB,
  189.  
  190. BCS_,//b
  191. LDA_IY,
  192. JAM_10,
  193. LAX_IY,
  194. LDY_ZX,
  195. LDA_ZX,
  196. LDX_ZY,
  197. LAX_ZY,
  198. CLV_,
  199. LDA_AY,
  200. TSX_,
  201. LAE_AY,
  202. LDY_AX,
  203. LDA_AX,
  204. LDX_AY,
  205. LAX_AY,
  206.  
  207. CPY_IM,//c
  208. CMP_IX,
  209. NOP_IM4,
  210. DCP_IX,
  211. CPY_ZP,
  212. CMP_ZP,
  213. DEC_ZP,
  214. DCP_ZP,
  215. INY_,
  216. CMP_IM,
  217. DEX_,
  218. SBX_IM,
  219. CPY_AB,
  220. CMP_AB,
  221. DEC_AB,
  222. DCP_AB,
  223.  
  224. BNE_,//d
  225. CMP_IY,
  226. JAM_11,
  227. DCP_IY,
  228. NOP_ZX5,
  229. CMP_ZX,
  230. DEC_ZX,
  231. DCP_ZX,
  232. CLD_,
  233. CMP_AY,
  234. NOP_6,
  235. DCP_AY,
  236. NOP_AX5,
  237. CMP_AX,
  238. DEC_AX,
  239. DCP_AX,
  240.  
  241. CPX_IM,//e
  242. SBC_IX,
  243. NOP_IM5,
  244. ISB_IX,
  245. CPX_ZP,
  246. SBC_ZP,
  247. INC_ZP,
  248. ISB_ZP,
  249. INX_,
  250. SBC_IM,
  251. NOP_,
  252. SBC_IM2,
  253. CPX_AB,
  254. SBC_AB,
  255. INC_AB,
  256. ISB_AB,
  257.  
  258. BEQ_,//f
  259. SBC_IY,
  260. JAM_12,
  261. ISB_IY,
  262. NOP_ZX6,
  263. SBC_ZX,
  264. INC_ZX,
  265. ISB_ZX,
  266. SED_,
  267. SBC_AY,
  268. NOP_7,
  269. ISB_AY,
  270. NOP_AX6,
  271. SBC_AX,
  272. INC_AX,
  273. ISB_AX,
  274.  
  275. INN /* # of instructions */
  276. };

Report this snippet  

You need to login to post a comment.