1. An integrated circuit for executing external program codes, comprising: a read-only memory, for storing program codes of a first routine and a second routine; a random access memory, comprising a first memory block and a second memory block; and a processor for executing the program codes of the first routine and accesses data in a plurality of first memory units in the first memory block, and executing the program codes of the second routine and accesses data in a plurality of second memory units in the first memory block, wherein the first memory units and the second memory units comprise at least one common memory unit and the processor executes program codes of a third routine from an external read only memory and accesses data in the second memory block.