Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN MIPS PART 2. AN ASM EXAMPLE ASM Programming instructions: For this part your goal is to run some example assembly code (provided below), and

IN MIPS

image text in transcribed

image text in transcribed

PART 2. AN ASM EXAMPLE ASM Programming instructions: For this part your goal is to run some example assembly code (provided below), and then modify the code to read in and add 3 numbers instead of just 2 2. 3. 4. 5. 6. 7, 8. data # variable declarations follow this line text # instructions follow this line main: ## Code Part 1: Get first number from user, put into $t0 ori $v0, $0,5 # OUR CODE BEGINS HERE: load syscall read-int into $v0. syscall # make the syscall. addu $t0, $0, $v0 # move the number read into $t0 ## Get second number from user, put into $t1. ori $v0, $0,5 # load syscall read-int into $v0. 10. syscall # make the syscall. 11, addu $t1, $0, $v0 # move the number read into St1. 12, add $12, $t0, $t1 # compute the sum. 13. ## Print out $t2. 14, addu $a0, $0, $t2 # move the number to print into $a0 15, ori $v0, $0. 1 # load syscall print-int into $v0. 16. syscall # make the syscall. 17. ori $v0, $0, 10 # syscall code 10 is for exit. 18. syscall # make the syscall. 19. ## end of add2.asm

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions

Question

How are members held accountable for serving in the assigned roles?

Answered: 1 week ago