Home Teaching Glossary ARM Processors Supplements Prof issues About

Write an ARM assembly language program to perform run length text compression. This is a data technique that replaces multiple instances of the same character by a count.

Your starting point is to be a buffer containing the ASCII text to be encoded. Assume that the text is stored in 7-bit ASCII-encoded form and terminated by the null character, 0.

The string is to be copied to a second buffer after compression. If character P occurs three or more times consecutively, it is replaced by nP. For example, “Hellllo” would become “Hel4o”.