PURPOSE: To update a program built in a ROM without replacing parts by providing this ROM mounting machine with a ROM erasing mechanism and a writing mechanism.
CONSTITUTION: A line switch 7 for switching a reading line 8 from the ROM 3 and a writing line 9 to the ROM 3 is turned to the reading line (8) side at the time of normal processing or turned to the writing line (9) side at the time of writing/erasing operation in/from the ROM 3. The erasing mechanism 4 has structure surrounding the whole ROM 3 and erases the written contents of the ROM 3 by irradiating the writing part of the ROM 3 with ultraviolet rays under the control of an erasing control part 5 to which power is supplied from a power supply 6. In the case of writing data in the ROM 3, necessary data are sent from the CPU 1 to the ROM 3 through the line 9 to write the data. Thereby, the contents written in the ROM can be changed without replacing the ROM 3.