Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

MIPS assembly language question, please fix my code to the following output My code: .data INPUTMSG: .asciiz Enter a hexadecimal number: INPUTHIGHMSG: .asciiz Specify

MIPS assembly language question, please fix my code to the following output

My code:

.data INPUTMSG: .asciiz "Enter a hexadecimal number: " INPUTHIGHMSG: .asciiz "Specify the high bit index to extract (0-LSB, 31-MSB): " INPUTLOWMSG: .asciiz "Specify the low bit index to extract (0-LSB, 31-MSB, low

.text

main: li $v0, 4 la $a0, INPUTMSG syscall # print out MSG asking for a hexadecimal li $v0, 8 la $a0, INPUT li $a1, 9 # one more than the number of allowed characters syscall # read in one string of 8 chars and store in INPUT

report_value:

li $v0, 4 la $a0, OUTPUTMSG syscall

li $v0, 4 la $a0, INPUTHIGHMSG syscall # print out MSG asking for high index

exit: li $v0, 10 syscall

image text in transcribed

Multiple sample runs (user input in blue): Enter a hexadecimal number: 0123456B Input: 0x0123456b = 19088747 Specify the high bit index to extract (O-LSB, 31-MSB): 34 Specify the low bit index to extract (O-LSB, 31-MSB, low

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students explore these related Databases questions