storing ir remote codes in non-volatile memory

you can only write program memory when its compiled in your code and uploaded (or in other words you cant do it on the fly) the 328 has 1k of eeprom that you can write any time you want, other than that your looking at ram or external rom