Documente Academic
Documente Profesional
Documente Cultură
home / study / engineering / computer science / computer science questions and answers / assembly language programming. due: description: t…
Question: Assembly Language Programming. Due: Description: This proj… Post a question
Answers from our experts for your toug
homework questions
Details:
Section 1:
Using the MARS or SPIM simulator develop a program that will evaluate the following expression: My Textbook Solutions
3 * n + n * (n – 1) – 15
where n is stored in a data location and is set to 15. Your program should use the system calls to print the
result and to exit the program.
Section 2:
Using the MARS or SPIM simulator develop a program that will implement the following conditional
statement.
Computer... A Practical Elect
If ( n is even) { n = n / 2; Guide to... Mach
5th Edition 3rd Edition 2nd E
} else { (50)
n = 3 * n + 1;
View all solutions
}
In this case, n is to be input by the user (assume they input a non-negative value), the conditional is
performed, and the resulting n is to be output. Again, use the system calls for input, output, and exiting the
program. Hint: There is a remainder pseudoinstruction for the MIPS architecture that you can use to
determine if the value is even or odd or you can look at bit 0 to determine if the value is even or odd. Computer Science Cheg
Section 3: tutors who can help righ
You are to take the conditional from the previous section and build a loop around it to nd the Collatz now
sequence. The structure of this would be:
while (n > 1) { Swati J.
If (n is even) { RGPV University
n = n / 2;
} else { Dhiraj K.
Birla Institute of Tec…
n = 3 * n + 1;
} Derek R.
cout << n; Florida Atlantic Univ…
}
Section 4: Find me a tutor
You are to write a leaf subprogram that will output the following information: Your Name
Your favorite sports team
The main program should call your leaf routine and then exit using the system call.
Section 5:
Write a program with a leaf subprogram that will take two values in $a0 and $a1 and compute their
greatest common divisor. The greatest common divisor should be returned in the $v0 register. The main
program should input the values for $a0 and $a1 using system calls, call your subprogram, and then
output the result using a system call.
Submission:
There are locations for you to submit the assignment available in BlackBoard. You need to upload only the
.asm (assembly language) le. There is a different location for EACH section.
Do just number 5 please using MARS 4.5 program
Expert Answer
Anonymous answered this
Was this answer helpful? 0 0
48 answers
Comment
Practice with similar questions
Q: Assembly Language Programming. Due: Description: This project will be done in parts that will increase in complexity.
Each portion is to be submitted online separately. In the assembly le for each section you must place a pair of comments
identifying yourself and the section that you are working on. # Name: Jerry Heuring # Project 1: Section 1 Details: Section
1: Using the MARS...
Q: Assembly Language Programming. Due: Description: This project will be done in parts that will increase in complexity.
Each portion is to be submitted online separately. In the assembly le for each section you must place a pair of comments
identifying yourself and the section that you are working on. # Name: Jerry Heuring # Project 1: Section 1 Details: Section
1: Using the...
Show more
Q: Section 2: Using the MARS or SPIM simulator develop a program that will implement the following conditional statement.
If ( n is even) { n = n / 2; } else { n = 3 * n + 1; } In this case, n is to be input by the user (assume they input a non-negative
value), the conditional is performed, and the resulting n is to be output. Again, use the system calls for input, output, and
exiting...
Q: Using the MARS or SPIM simulator develop a program that will evaluate the following expression: 3 * n + n * (n – 1) – 15
where n is stored in a data location and is set to 15. Your program should use the system calls to print the result and to
exit the program.
Show more
ABOUT CHEGG LEGAL CHEGG PRODUCTS AND SERVICES CHEGG NETWORK CUSTOMER SERVICE
Become a Tutor Advertising Choices Cheap Textbooks Online Tutoring CareerMatch Customer Service
Chegg For Good Cookie Notice Chegg Coupon Sell Textbooks Easybib Give Us Feedback
College Marketing General Policies Updated Chegg Play Solutions Manual Internships.com Help with Chegg Tutors
Corporate Development Intellectual Property Rights Chegg Study Help Study 101 Studyblue Help with eTextbooks
Investor Relations International Privacy Policy College Textbooks Test Prep Help to use EasyBib Plus
Jobs Terms of Use Updated eTextbooks Textbook Rental Manage Chegg Study
Join Our Affiliate Program Chegg Tutors Terms of Chegg Math Solver Used Textbooks Subscription
Media Center Service Mobile Apps Digital Access Codes Return Your Books