A method and apparatus for programming nonvolatile (flash) memory in a
microcontroller. A nonvolatile memory in the microcontroller is connected
via data, address and control signal paths to a processor internal to the
microcontroller. These paths are not available to the outside world. In
order to program the nonvolatile memory, a tester/programmer provides
instructions to a test/control interface and the actual programming of
the nonvolatile memory is carried out under control of a supervisory ROM
forming a part of the microcontroller storing instructions which are
carried out by the processor.