In Progress

MIPS assembly

Write a main program for the MIPS machine that calls a function “get_long” that uses syscall to repeatedly prompt the user to enter a string of decimal digits that represent a valid unsigned decimal integer in the range 0 to 9223372036854775807 (i.e. up to 63 bits in size). Valid strings may only contain the characters ‘0’ through ‘9’. All strings other than valid decimal integers should be rejected. If an invalid number is entered, then the function should return -1 (as an error code) in $v0, otherwise the function should return the 64-bit numeric value represented by the decimal string with the most significant bits in $v0 and the low part of the value in $v1. Entering 0 should cause the program to terminate.

The double precision floating point representation of the same decimal integer should also be produced. The program should use the print_double syscall to display the double precision float value.

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

Skills: PHP, Software Architecture

See more: unsigned integer, unsigned bits, representation of integers, low bits, integers and, integer and floating point representation, floating point integers, double precision bits, bit representation, bit bits, all bits, 32 bit unsigned integer range, 32 bit unsigned integer, 16 bit representation, 0 bits, mips print_double decimal, mips get_long, numeric, mips ASSEMBLY, floating, float, mips machine, string float, mips assembly program, php string contain

About the Employer:
( 5 reviews ) Bowie, United States

Project ID: #817006

Awarded to:

XuTPbIu

Hello. Thanks for invintation. I can do that too.

$80 USD in 1 day
(1 Review)
1.8