command mode after the amd flash rom enters the command mode the cpu erases the boot code the ediags information and the eisa configuration code from sector 7 once the contents of sector 7 have been erased the cpu checks to determine if an error occurred in the erase operation in step 144 if an error is detected by the cpu the cpu reprograms the ediag block and the boot block in step 146 by copying back into sector 7 of the flash rom the information previously copied to ram which comprises the ediags instructions and the boot block according to the amd specifications the reprogramming occurs by transmitting a sequence of commands to the flash rom followed by the address of the location in rom to be reprogrammed and then sending the byte of data to be stored at that address after the byte is sent the cpu checks the contents of the byte to make sure the data was properly written to the desired location in rom this procedure must be repeated in the amd flash rom for each byte to be reprogrammed after the ediag block and the boot block have been copied back to flash rom in step 146 the cpu sets the carry flag cf and sets the upper half of register ax ah equal to 84 in hexadecimal notation in step 148 to indicate that an error occurred when writing nonvolatile memory after setting the carrier flag and the contents of register ax the cpu leaves the protected mode in step 158 and returns to the program of fig4 b if no error occurs in the erase operation the cpu in step 150 reprograms the ediags block and the boot block to the flash rom.