Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

ASSEMBLY MIPS entry level lab, can anybody help me with this this is how the out

ID: 3864763 • Letter: A

Question

ASSEMBLY MIPS entry level lab, can anybody help me with this

this is how the output should look :

Problem: Create a MIPS asm program that requests for three numbers from the user. Month, Day, and Year. You may assume that a valid date is given. Your program will return the DAY number of the year. Your program should accurately calculate leap years. Your program function should accept the month (1 through 12), day, and year as unsigned integers As an example, January 1, 1994 is day 1. December 31, 1993 is day 365. December 31, 1996 is day 366 since 1996 is a leap year. A year is a leap year if it's divisible by four except that any year divisible by 100 is a leap year only if it's also divisible by 400. You should use the modulus function you wrote in lab 5 for this assignment. Notes: Comment your code Assignments should be submitted via Blackboard by due date and time o Include only the asm file Assignment must be printed and handed in See second page for expected output

Explanation / Answer

.MODEL SMALL .STACK 64 .DATA SAVEDAY DB ? SAVEMON DB ? TEN DB 10 ELEVEN DB 11 TWELVE DB 12 DAYSTAB DB ' SUNDAY, $ ', ' MONDAY, $ ' DB ' TUESDAY, $ ', ' WEDNESDAY, $ ' DB ' THURSDAY, $ ', ' FRIDAY, $ ' DB ' SATURDAY, $ ' MONTAB DB ' JANUARY $ ', ' FEBUARY $ ', ' MARCH $ ' DB ' APRIL $ ', ' MAY $ ', ' JUNE $ ' DB ' JULY $ ', ' AUGUST $ ', ' SEPTEMBER $ ' DB ' OCTOBER $ ', ' NOVEMBER $ ', ' DECEMBER $ ' .CODE BEGIN PROC FAR MOV AX,@DATA MOV DS,AX MOV ES,AX MOV AX,0600H CALL Q10SCR CALL Q20CURS MOV AH,2AH INT 21H MOV SAVEMON,DH MOV SAVEDAY,DL CALL B10DAYWK CALL C10MONTH CALL D10DAYMO CALL E10INPT CALL Q10SCR MOV AX,4C00H INT 21H BEGIN ENDP B10DAYWK PROC NEAR MUL TWELVE LEA DX,DAYSTAB ADD DX,AX MOV AH,09H INT 21H RET B10DAYWK ENDP C10MONTH PROC NEAR MOV AL,SAVEMON DEC AL MUL ELEVEN LEA DX,MONTAB ADD DX,AX MOV AH,09H INT 21H RET C10MONTH ENDP .386 D10DAYMO PROC NEAR MOVZX AX,SAVEDAY DIV TEN OR AX,3030H MOV BX,AX MOV AH,02H MOV DL,BL INT 21H MOV AH,02H MOV DL,BH INT 21H RET D10DAYMO ENDP E10INPT PROC NEAR MOV AH,10H INT 16H RET E10INPT ENDP Q10SCR PROC NEAR MOV AX,0600H MOV BH,17H MOV CX,0000 MOV DX,184FH INT 10H RET Q10SCR ENDP