A method of programming and erasing a nonvolatile memory, especially for flash type memory.