A 1-chip microcomputer of the present invention has (a) a monitor flag for
setting a flag indicating that a specified address space is accessed, (b)
an access permission address range setting register, for setting an
address range in which an access is permitted while the flag is set, (c)
an access permission area detection circuit for judging whether the
access is made within the address range thus set, (d) an access
permission setting register, for setting whether or not an access with
respect to an address other than the address range should be permitted,
and (e) memory read-out control circuit and memory writing control
circuit for controlling an access with respect to a nonvolatile memory
based on a result thus judged and content set by the access permission
setting register. With the arrangement, it is possible to provide a
1-chip microcomputer that maintains the security among application
programs.