subject

Objective: Gain more experience with MIPS programming. and in using macros. Overview: In this program you will implement a very simple compression algorithm, RLE, as described in Wikipedia: Run-length encoding (RLE) is a very simple form of lossless data compression in which runs of data (that is, sequences in which the same data value occurs in many consecutive data elements) are stored as a single data value and count, rather than as the original run. This is most useful on data that contains many such runs For example, 'AABBBC" would be encoded as: A2B3C1 Macro File: Create macros to print an int, print a char, print a string, get a string from the user, open file, close file, read file, and allocate heap memory. You can use more macros than these if you like. Main Program File:
1. Allocate 1024 bytes of dynamic memory and save the pointer to the area.
2. The main program is a loop in which you ask the user for a filename. If they enter nothing for the filename, exit the program. Otherwise:
a. Open the file for reading. If the file does not exist, print an error message and terminate the program
b. Read the file into an input buffer space of 1024 bytes
c. Close the file.
d. Output the original data to the console.
e. Call the compression function. Save the size of the compressed data in memory.
f. Call a function to print the compressed data.
g. Call the uncompress function. Print the uncompressed data.
h. Print the number of bytes in the original and compressed data.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:40
It is vital to research each of the services you plan to disable before implementing any change, especially on critical machines such as the: a. servers in the test environment. b. domain controller and other infrastructure servers. c. desktops that have previously been attacked. d. desktops used by upper-level management.
Answers: 2
question
Computers and Technology, 22.06.2019 10:40
"it security policy enforcement and monitoring" respond to the following: describe how monitoring worker activities can increase the security within organizations. describe the rationale that managers should use to determine the degree of monitoring that the organization should conduct. explain the extent to which you believe an organization has the right to monitor user actions and traffic. determine the actions organizations can take to mitigate the potential issues associated with monitoring user actions and traffic.
Answers: 3
question
Computers and Technology, 22.06.2019 20:40
Assume that there is a 4% rate of disk drive failure in a year. a. if all your computer data is stored on a hard disk drive with a copy stored on a second hard disk drive, what is the probability that during a year, you can avoid catastrophe with at least one working drive? b. if copies of all your computer data are stored on three independent hard disk drives, what is the probability that during a year, you can avoid catastrophe with at least one working drive?
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
Sports and entertainment class, your goal is to increase attendance and make a profit for a game by getting your team on a winning track with total salaries less than $3,000,000
Answers: 3
You know the right answer?
Objective: Gain more experience with MIPS programming. and in using macros. Overview: In this progra...
Questions
question
Mathematics, 14.06.2021 14:00
question
Mathematics, 14.06.2021 14:00
question
Computers and Technology, 14.06.2021 14:00
question
Mathematics, 14.06.2021 14:00