Write a MIPS Assembly Language program to output your name along with the month
ID: 2247308 • Letter: W
Question
Write a MIPS Assembly Language program to output your name along with the month and day of your birth.
Example: John Doe 02/29
Upload your source code and report.
All programs need to be written in MIPS Asswmbly Language and function properly in MARS.
Grading:
10% Builds and executes producing correct results.
20% Comments.
30% Report with screen captures showing build and execution.
40% Source code: clean, clear, and maintainable.
Losses in one category may cause losses in all other categories. For example, a code which does not build and execute will likely cause losses in all of the other categories. Code which cannot be easily followed may result in losses in all other categories. Poor documentation (i.e., the report) may cause losses in all other categories
https://elearning.utdallas.edu/bbcswebdav/pid-1670178-dt-content-rid-16830372_1/courses/2178-merged-CS3340002-SE3340002/Report%20Standards.pdf
https://elearning.utdallas.edu/bbcswebdav/pid-1670178-dt-content-rid-16830371_1/courses/2178-merged-CS3340002-SE3340002/Comment%20Standards.pdf
Explanation / Answer
#include //Always use meaningful names for types typedef unsigned char boolean; #define True 't' #define FALSE (!True) //this is a really neat trick for swapping values efficiently void swap(long* a,long *b) { *a=*a^*b;*b=*b^*a;*a=*a^*b; } //Here's a readability improvement #define until(condition) while(!(condition)) int main(int n, char*args[]){ double *d; int i; char input[5]; //should be long enough for most doubles. boolean sorted = FALSE; //In C, you need to specify the array size beforehand, so ask printf("Please enter the length of the array "); gets(input); //scan the input string and convert to a value sscanf(input,"%s",&input[0]); n=(long)atol(input); //allocate space, make sure you get the order of arguments right. d = calloc(sizeof(double),n); //Get and sort the array until (sorted) { for (i=0;iRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.