A semiconductor device 10 sets a pass-through flag to ON when the top
address of a write-prohibited area is passed. When a request to write
data to a write-restricted area WRA is received, the semiconductor memory
device 10 determines whether or not the pass-through flag is set to ON,
and if the pass-through flag is not set to ON, the semiconductor memory
device 10 executes writing of the data to the write-restricted area. On
the other hand, if the pass-through flag is set to ON, the semiconductor
memory device 10 does not execute writing of the data to the
write-restricted area.