Question: Please write the code in mips assembly language. Thanks! ## Question: (Linear interpolation) ## Given a straight line and a value x, ## find the

 Please write the code in mips assembly language. Thanks! ## Question:

Please write the code in mips assembly language. Thanks!

## Question: (Linear interpolation) ## Given a straight line and a value x, ## find the value y so that (x,y) is on the line ## The line is given by its slope dy/dx as integers, ## and the y-axis intercept ## ## Since we are doing integer arithmetic, the answer will not be exact ## Divide as late as possible, and ignore possible remainder ## #/*# Output format must be: #/*# "answer = 13" */ #include /* for printf in C programs */ #/*############################################## # # # text segment # # # ################################################# .text .globl --start --start: # execution starts here */ #/* Any changes above this line will be discarded by # mipsmark. Put your answer between dashed lines. */ #/ start cut */ #/* Student's Name: Account: #/*- end cut # Any changes below this line will be discarded by # mipsmark. Put your answer between dashed lines. ################################################# # # # data segment # # # ################################################# .data #*/ X: .word 9 #find y for this value dy: .word 10 # vertical rise dx: .word 6 # horizontal run intercept: .word -2 #line crosses y-axis here y: word -99 #may optionally use this memory... temp: .word 0 ans: .asciiz "answer = endl: .asciiz

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!