MOS6502 emulation for Atmega32 microcontroller