A security method for preventing accidental or unauthorized writes to a
flash memory. According to one embodiment of the present invention, a
BIOS program stored in a flash memory array generates a random access
code when executed by a processor. A check register stores the random
access code and enables write operations to the flash memory array based
upon an externally provided access code. In another embodiment, the BIOS
program directs the processor to write the random access code to the
check register to enable write operations in response to an external
write request.