The program (as in the EhBASIC ROM image) is stored in the flash memory along with the code. The emulator has access to 1536 bytes of RAM, but the first 512 bytes make up the 6502's zero page and stack page, then the next 256 are used by the BASIC interpreter itself. The 767 bytes is just what EhBASIC reports as the remaining storage for BASIC code and variables.
I wouldn't want to use EEPROM because it can only be written to so many times before it goes bad. I'm looking into getting a 32 KB SPI chip for more memory. Should be pretty simple.

[/quote]
Hi
I hacked around abit with your emulator and patched Read/Write6502.
I used a 24LC256 32Kb EEPROM for memorystorage.
It can take 1000000 writes before going bad.
To be safe I mapped the first 768bytes to Arduino RAM and the rest is EEPROM space.
That should keep it relative safe even though the basic variables gets written in EEPROM when the basicprogram runs.
It's just a first test any as I plan to run CBM-basic on it for Vic-20/C64 emulation.