[Show all top banners]

hawking666

More by hawking666
What people are reading
Subscribers
:: Subscribe
Back to: Computer/IT Refresh page to view new replies
 MIPS programming HELP !
[VIEWED 2847 TIMES]
SAVE! for ease of future access.
Posted on 03-22-15 1:10 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I am new to MIPS programming and i can't finish this assignment. I didn't find many tutorials for MIPS programming related to this assignment. Any help would be much appreciated. Thank you

Write a "merge" program that merges two ordered lists of integers into a new ordered list. For example, given two ordered lists (9,6,4,1) and (7,3,2,0) as input arguments, "merge" should produce a new list (9,7,6,4,3,2,1,0) which is also ordered. Another example could be to merge (6,0,-3) and (9,5,4,0,-2) to produce (9,6,5,4,0,0,-2,-3).

Here is my code so far:
.data
prompt1: .asciiz "Please enter the first set of integers: \n "
prompt2: .asciiz "Please enter the second set of integers: \n"

.align 2
array1:
.space 80 #this is to allocate space for the array

.align 2
array2:
.space 80

MergeResult:
.asciiz "The 2 lists combined in decreasing order produces:"
.align 2
result:
.space 64

.text
.globl main
main:
# print the prompt
li $v0, 4
la $a0, prompt1
syscall

#get the user input
li $v0, 5
syscall

#store the user input
move $t0, $v0

#print the integer
li $v0, 1
move $a0, $t0
syscall

li $v0, 10
syscall


 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 365 days
Recommended Popular Threads Controvertial Threads
NRN card pros and cons?
ANA and AJAY KUMAR DEV. RAPISTS CONVENTION
TPS To F-1 COS
TPS to F1 Status.
Nepal TPS has been Extended !!!
legal Query for married nepali girl now have taken US citizenship
Got my F1 reinstatement approved within 3 months(was out of F1 for almost 2 years)
Democrat wants to run election like in India. Chaos and Confusing to voters.
2020 : Why No Trump !
#MAGA#FAFO is delicious
TPS of Nepal to be automatically extended for 6 months based on South Sudan decision
Breaking News: Ninth Circuit Rejects Government Bid to Undo Nepal TPS Order, Leaves Protections in Place
Democrat lies revealed
Nepal TPS decision
Has anyone here successfully reinstated to F-1 status after a year-long gap following a drop from F-1?
US citizen Petitioning my wife who was out of status when she was in H1B. What to do ?
TPS Sakiyo Tara Case is in Court.
Medication from Nepal to USA
Supreme Court allows Trump to end TPS for Venezuelans
नोबेल शान्ति पुरस्कार र अशान्त राष्ट्रपतिको बालहठ
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters