Reference no: EM131398276
Project- Assembly Language Programming.
Description:
This project will be done in parts that will increase in complexity. Each portion is to be submitted online separately. In the assembly file 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 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.
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 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.
Section 3:
You are to take the conditional from the previous section and build a loop around it to find the Collatz sequence. The structure of this would be:
while (n > 1) {
If (n is even) {
n = n / 2;
} else {
n = 3 * n + 1;
}
cout << n;
}
Section 4:
You are to write a leaf subprogram that will output the following information:
Your Name
Your favorite color
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) file. There is a different location for EACH section..
Discuss the concept of image
: Discuss the concept of "image." How does image affect one's interpretation of an organization? How does it affect how one approaches organizational issues? How does image affect function and outcomes in an organization?
|
What is meant by neuroplasticity of the pain pathways
: What is meant by "neuroplasticity" of the pain pathways? Could this phenomenon provide viable alternatives to use of pain meds in the clinical management of patients
|
Hypothesize how the political marketplace dealt
: Using smoke-free laws as an example, research how and why such laws come about. Analyze the stakeholders involved and hypothesize how the political marketplace dealt with the issue.
|
Analyze network function virtualization and cloud computing
: Analysis of network function virtualization and cloud computing. Examination of opportunities and challenges (e.g., security, cost, reliability, and availability). Videos, audio, photos, diagrams, or graphs as appropriate.
|
Develop a program that will implement conditional statement
: EECS 2110- Using the MARS or SPIM simulator develop a program that will implement the following conditional statement. Write a program with a leaf subprogram that will take two values in $a0 and $a1 and compute their greatest common divisor.
|
Definition of a global citizen
: ou are asked to write a research essay addressing each one of the following subjects: Your definition of a global citizen, Doing Business in Brazil and The challenges of living in Brazil
|
How the speech content and presentation might differ
: You will then begin to write your post in narrative form by describing how the speech content and presentation might differ for the two audiences in regard to the specific topic and the delivery of the speech
|
Discuss the underlying rationale and motivation
: Discuss the underlying rationale/motivation for UN climate change conference in Paris. Highlight the successes and/or failures of the conference...be specific. Who are beneficiaries of this landmark agreement if any?
|
Describe which form of market efficiency is consistent
: The CFO of a certain company always wears his green suit on a day that the firm is about to release positive information about his company. You believe that you can profit from this information by buying the firm’s shares at the beginning of every da..
|