ah... ok, here it is, but there is also other stuff in front of it, so you need to remove stuff before line 397. Ask permission to use it from Simon, he is a nice fellow.
I have a package called ZX65SIM, it contains a 6502 emulator for CP/M (including the source and some technical docs). It's from 1982 If you want it just drop me an email.
I made one a loooooong time ago. I'm not really sure, but iirc it has been released on some FutureDisk, don't know which issue...
Anyways, it hasn't really been tested so it probably has lots of bugs in it, plus it doesn't have virtual memory.
So, you're probably better off using some other emu
Indeed; but not the emulation specific code....what are you cooking PingPong?
Nothing special, only a matter to see how are performance using a pseudo interpreter.
(In my mind comes a little idea: a z80 recompiler for 6502 code)