Question: just do the main and the do_math and the do_add functions code must be done in mips32 thak you CSCI 201 Class P ? ?


just do the main and the do_math and the do_add functions code must be done in mips32 thak you
CSCI 201 Class P ? ? Floating Point Mul X y Finalprojectpat x Homework1.pdf ? Data Representat x computer organi. Oll] Binary Arithme Che g Study IG ? un , \ CSecure https//piazza-resourcessamazonaws.con/jcjopchocb93d8/jg2fvjw2ne3k f/X-Armz-Algorithm-AlNS4-HMAC-SHA256&X-Amz-Cr edential=ASIAJ22 BKRSCDCKDUALA%? 201 80422%2hus-eas I. Print the following prompt message: Please enter an integer: 2. Read an integer from user. 3. Print the following prompt message: Plcase enter an oporator + -,*, /): 4. Read a character from user 5. Print the following prompt message: Please enter an integer: 6. Read an integer from user 7. Call do_math. Pass the two integers and the operator using registerS. 8. Retu 0 from main using jr (do not use the 'exit syscall). The do math function takes as argument three registers and does the following: . If the operator register containscall do_add passing the two integers in registers and receiving the return values in two registers. 2. Otherwise, if the operator register contains call do_subtract passing the 3. Otherwise, if the operator register contains '*'. call do_multiply passing 4. Otherwise, if the operator register contains ', call do-divide passing the two integers in registers and receiving the return values in two registers. the two integers in registers and receiving the retun values in two registers. two integers in registers and receiving the return values in two registers 5. Otherwise, print the following error message, replacing OP with the character stored in the operator register, and exit the program. Error invalid arithmetic operation OP Print the following message: 6. Where 2 is the arithmetical result of the operation OP conducted on the two integers input from the user, X and . 2:19 PM 4/23/2018 21 O Type here to search Ap CSCI 201 Class P ? ? Floating Point Mul X y Finalprojectpat x Homework1.pdf ? Data Representat x computer organi. Oll] Binary Arithme Che g Study IG ? un , \ CSecure https//piazza-resourcessamazonaws.con/jcjopchocb93d8/jg2fvjw2ne3k f/X-Armz-Algorithm-AlNS4-HMAC-SHA256&X-Amz-Cr edential=ASIAJ22 BKRSCDCKDUALA%? 201 80422%2hus-eas I. Print the following prompt message: Please enter an integer: 2. Read an integer from user. 3. Print the following prompt message: Plcase enter an oporator + -,*, /): 4. Read a character from user 5. Print the following prompt message: Please enter an integer: 6. Read an integer from user 7. Call do_math. Pass the two integers and the operator using registerS. 8. Retu 0 from main using jr (do not use the 'exit syscall). The do math function takes as argument three registers and does the following: . If the operator register containscall do_add passing the two integers in registers and receiving the return values in two registers. 2. Otherwise, if the operator register contains call do_subtract passing the 3. Otherwise, if the operator register contains '*'. call do_multiply passing 4. Otherwise, if the operator register contains ', call do-divide passing the two integers in registers and receiving the return values in two registers. the two integers in registers and receiving the retun values in two registers. two integers in registers and receiving the return values in two registers 5. Otherwise, print the following error message, replacing OP with the character stored in the operator register, and exit the program. Error invalid arithmetic operation OP Print the following message: 6. Where 2 is the arithmetical result of the operation OP conducted on the two integers input from the user, X and . 2:19 PM 4/23/2018 21 O Type here to search Ap
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
