摘要 |
Method and apparatus for executing a program stored in a non-volatile memory are disclosed. A method of executing a program includes the step of initiating execution of a program stored in a non-volatile memory. An exception is generated if a program command attempts to write to a location within the non-volatile memory. In response to the exception, a portion of the contents of the non-volatile memory including the location is relocated to a main memory with a program status of read/write/execute. The program is restarted at the program command causing the exception. An apparatus for executing a program stored in a non-volatile memory includes a main memory. The non-volatile memory is coupled to a main memory bus of the main memory. The program stored in the non-volatile memory has a read/execute program status. A processor is coupled to the main memory bus. An exception is generated during the processor execution of the program if a program command attempts to write to a location within the non-volatile memory. A portion of the program including the location is relocated to the main memory with a status of read/write/execute in response to the exception. Program execution is subsequently restarted at the program command.
|