Question: MAKE SURE YOU READ THE INSTRUCTIONS CORRECTLY AND THAT THE PROGRAM COMPILES. You are required to write a C program whose input is a MIPS

 MAKE SURE YOU READ THE INSTRUCTIONS CORRECTLY AND THAT THE PROGRAM

COMPILES. You are required to write a C program whose input is

a MIPS Assembly Language (MAL) program and whose output is a list

of labels of the MAL program used as variables, a list of

labels of the MAL program used for the flow control or both

Details regarding MAL programs and lists of labels are given beloW Command

Line Details: Suppose the executable version of your program is named prog4.

MAKE SURE YOU READ THE INSTRUCTIONS CORRECTLY AND THAT THE PROGRAM COMPILES.

You are required to write a C program whose input is a MIPS Assembly Language (MAL) program and whose output is a list of labels of the MAL program used as variables, a list of labels of the MAL program used for the flow control or both Details regarding MAL programs and lists of labels are given beloW Command Line Details: Suppose the executable version of your program is named prog4. out. The program will be executed by a command line of the following form: prog4.out flag inputfile outputfile In the command line above, the arguments inputfile and outputfile specify the names of the input file (which contains a MAL program) and the output file respectively. A valid flag argument is one of -v, - f or -b If the flag is -v, your program must produce only a list of labels of the MAL source program used as variables in the specified output file. (Variable labels are identifiers defined in the .DATA segment of a MAL program.) If the flag is -f, your program must produce only a list of labels of the MAL program used for the flow control in the specified output file. (Flow control labels are identifiers defined in the . TEXT segment of a MAL program.) If the flag isb, your program must produce (i) a list of labels of the MAL source program used as variables, and (ii) a list of labels of the MAL program used for the flow control in the specified output file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!