#6502 EMULATOR C SOURCE CODE CODE#
To me speed is not an issue so instead of writing a huge switch-case statement and repeat the same code again and again different opcodes can refer to the same instruction using a different addressing mode I'd like to separate actual instruction code from the addressing mode code: I found this solution very neat as it would require to write only 13 addressing mode functions and 56 instruction functions without repeat myself. The has 56 different instructions plus 13 addressing modes giving a total of different opcodes. I used to write down a lot of assembly code for this CPU so all the opcodes, addressing modes and other stuff are not a big deal. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service.