6502 emulator in ANSI C