Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do the question thoroughly and do it right. Do not attempt if you are confused or inexperienced. I've had other failed attempts already on

image text in transcribed

image text in transcribed

Please do the question thoroughly and do it right. Do not attempt if you are confused or inexperienced. I've had other failed attempts already on Chegg. This is a do or die situation. So, do it right! Course - Computer Organization

2. Find the errors in the program and run the debugged program to display the output. (5 marks) # Start data segment (datal) data msgi: asciit "Enter A: - msg2: ascliz "Enter B: msg3: asciiz "A+B= newline: asciiz " " # Start.text segment (program code) main: # Print string msg1 Sv0,4 #print_string syscall code = 4 Sao, msg1 #load the address of msg syscall #Get input A from user and save li $v0,5 #read_int syscall code = 5 move Sto, # syscall results returned in Svo Print string msg2 $v0,4 la Sa0, msg2 syscall #print_string syscall code = 4 #load the address of msg2 # Get input 6 from user and save $v0,5 #read_int syscall code = 5 syscall move $t1, Svo #syscall results returned in Svo Mathi Sto, Sto, $t1 #A=A+B Print string msg3 Svo, 4 Sa0, msg3 syscall Print sum 1 Sv0,1 move Sao, Sto syscall # Print $v0,4 $ad, new line syscall #print_int syscall code = 1 #int to print must be loaded into Sao #print_string syscall code = 4 $v0,10 #exit syscall >>>>>>>>> GOOD LUCK

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

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions