MIPS ASSSEMBLY HELP

profileCoderToHelpU
1925382294_1.doc

Computer Science 605.204

Lab Assignment 4

Write a main program for the MIPS machine that repeatedly prompts the user to enter a string of decimal digits that specify a 64-bit unsigned integer value. Only the characters ‘0’ through ‘9’ should be accepted within the string. For each valid string entered, the program should generate the internal 64-bit representation of the unsigned integer as well as the 64-bit floating point representation of the same integer value. For each 64-bit integer value produced, the program should display both the internal integer representation and the internal double precision floating point representation (each as a 16-digit hex number). Values that lie outside the range of a 64-bit unsigned integer should be rejected. The program should terminate if the string entered represents zero. Note that since there is no 64-bit integer to 64-bit floating point conversion instruction, you will need to write a function that accepts the 64-bit integer in $a0 (the high 32 bits) and $a1 (the low 32 bits), and returns the 64-bit floating point representation in $v0 (the high part) and $v1 (the low part).

This exercise involves converting between external and internal representation. The READ_INT syscall only accepts 32-bit integers and therefore cannot be used to input the 64-bit decimal integer value.

image1.png

Make sure that you include a comment block at the head of the source file that specifies your name and explains the purpose of the program. Also comment the code to make it easier to read and follow the program logic. After you have written and tested your program using the SPIM simulator, upload a text-only version of the source code to the course web site. Use yourname4.s (note the .s extension) as the filename for the attachment.