This is a simple example of an emulator for MOS6502 CPU.
$ git clone https://github.com/febits/MOS6502
$ cd MOS6502
$ make
$ ./6502 -p [PROGRAM]
The programs reside in the "./samples" directory, and they are the ones without an extension or with a ".bin" extension. For example:
$ ./6502 -p samples/assembly/fibonacci/fibonacci3.bin
$ ./6502 -p samples/jumps/jsr
Anyway, there are numerous examples covering almost all of the legal instructions for the MOS6502.
- I didn´t implement all the addressing modes of 6502.
- There are instructions missing, but most of them are there (legal ones).
- I created a lot of conventions myself.
- This project is purely 4fun purposes, so don't take it too seriously.