The present invention provides an
overlay instruction accessing unit and method, and a method and apparatus for compressing and storing a program. The
overlay instruction accessing unit is used to execute a program stored in a memory in the form of a plurality of compressed program segments, and compresses: a buffer; a
processing unit for issuing an instruction reading request, reading an instruction from the buffer, and executing the instruction; and a decompressing unit for reading a requested compressed instruction segment from the memory in response to the instruction reading request of the
processing unit, decompressing the compressed instruction segment, and storing the decompressed instruction segment in the buffer, wherein while the
processing unit is executing the instruction segment, the decompressing unit reads, according to a storage address of a compressed
program segment to be invoked in a header corresponding to the instruction segment, a corresponding compressed instruction segment from the memory, decompresses the compressed instruction segment, and stores the decompressed instruction segment in the buffer for later use by the processing unit.