Question: Design the program to decompress the data sequence saved in the .data section (COMPRESSED) and store the decompressed data to the corresponding memory location (DECOMPRESSED)
Design the program to decompress the data sequence saved in the .data section (COMPRESSED) and store the decompressed data to the corresponding memory location (DECOMPRESSED) as a sequence. 0 is used to denote the end of the data sequence in the compressed representation. Check the memory location where the decompressed data saved at .
If there is a high possibility of successively repeated values shown in the data set, instead of storing every number as a sequence, the data can be represented by pairs of (N, Value), which N stands for the number of repeated Value shown successively, achieving data compression. For example, the data sequence: 25, 25, 25, 25, 18, 18, 18, 31, 31, 31, 31, 31 can be saved as 4, 25, 3, 18, 5, 31. To save all numbers in the sequence will take 12*4 bytes, however, it only takes 6*6 bytes with the pairs representation, performing compression.
***THIS WAS THE ONLY INFORMATION GIVEN REGARDING THIS PROBLEM****

.text code segment for your design .data COMPRESSED: #(number, data), 0 : end of data word 3, 0xEECE, 2, 0x9527, 4, 0xFOOD, 5, 0xCAFE, 1, 0xABCD, e DECOMPRESSED .skip 4*(3+2+4+5+1) .text code segment for your design .data COMPRESSED: #(number, data), 0 : end of data word 3, 0xEECE, 2, 0x9527, 4, 0xFOOD, 5, 0xCAFE, 1, 0xABCD, e DECOMPRESSED .skip 4*(3+2+4+5+1)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
