Question: 1-a) Write a program which sums two numbers specified by the user at runtime We'll write a program named add2.asm that computes the sum of
1-a) Write a program which sums two numbers specified by the user at runtime We'll write a program named add2.asm that computes the sum of two numbers specified by the user at runtime and displays the result on the screen. The algorithm that this program will follow is: 1. Read the two numbers from the user. We'll need two registers to hold these two numbers. We can use $t0 and $t1 for this. a. Get first number from user, put into $t0. i. load syscall read_int into $v0, ii. perform the syscall, iii. move the number read into $t0. b. Get second number from user, put into $t1 i. load syscall read_int into $v0, ii. perform the syscall, iii. move the number read into $t1.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
