Question: 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

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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!