The present invention relates to a semiconductor memory.  More particularly, the present invention relates to a technique which may effectively be used for, for example, a mask-programmed ROM (read-only memory) in which data is written by ion implantation of an impurity carried out through a gate electrode. 
Parallel mask-programmed ROMs in which a storage MOSFET (Metal Insulator Semiconductor Field Effect Transistor) is formed in accordance with data to be stored at the intersection between a word line and a data line are known (see, e.g., "How to Use IC Memory", Matsuo Nitta and Ryoichi Oomote, Sept. 30, 1977, Sangyo Shuppan Kabushiki Kaisha, pp.  73 to 76). 
As one of such Parallel mask-programmed ROMs, a mask-programmed ROM which is described in "Electronics", May 31, 1983, pp.  50 to 51, is known.  In this ROM, after data lines made of aluminum film have been formed, an impurity is introduced into the channel regions of MOSFETs defining memory cells by means of ion implantation carried out through gate electrodes (and an intermediate insulator film).  In this way, the threshold voltage of the individual MOSFETs is raised (or lowered), and data is thereby stored. 
In the mask-programmed ROM of the type described above, data is written after the formation of data lines and source lines which is carried out near the end of the manufacturing process, which means that it is possible to reduce the time required to complete the production.