Patent ID: 7600062

Claim:
A method for micro-code execution, comprising the steps of: loading a main core of a micro-code from a first storage module into a second storage module of an electronic device; switching execution between the second storage module for executing the main core and the first storage module for executing one or a plurality of function codes of the micro-code to control operation of the electronic device; the main core being executed from the second storage module, and the function code or the function codes being stored in and executed from the first storage module, each of the function codes corresponding to a type of a storage medium; executing an update program in the main core from the second storage module to update the micro-code stored in the first storage module when data of the micro-code is to be updated; executing the main core to monitor for receiving a command issued by a host; executing the main core to check a type of a storage medium; when the type is determined as a specific type and the corresponding function code is required to act upon the storage medium, switching execution of the main core to execution of the function code; and after the corresponding function code acting upon the storage medium is finished, switching execution of the function code to execution of the main core; wherein the function code or the function codes are executed when called by execution of the main core in the second storage module after the electronic device has completely booted.