[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 2265 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 60 days
Recommended Popular Threads Controvertial Threads
TPS To F-1 COS
if you are in USA illegally and ask for asylum it is legal
Democrat lies revealed
#MAGA#FAFO is delicious
2020 : Why No Trump !
TPS Sakiyo Tara Case is in Court.
Dementia Joe has been selected to become the next President
Medication from Nepal to USA
Nepal Likely to Get 60-Day TPS Notice
Are you ready to know the truth?
Nepal TPS Hearing: 9 Room, 19 Floor, 29 July
TPS cancel bho bhane k garne?
मुद्दा हाल्छन होला र ?
NEPAL TPS IS GONE
A legit Non-Profit organization "United For TPS Nepal "
Trump’s “Big Beautiful Bill” is straight-up xenophobic class warfare. Let’s call it what it is.
Nepal TPS Extension Possible as Court Reviews Late Notice Issue
🛡️ Nepal TPS Holders: Don’t Panic About August 5 — DHS Screwed Up (Maybe on Purpose)
Bill to Protect TPS and DED Recipients
कोर्टमा जाँदा आइसले समात्ला भन्ने डर छ भने यस्तो गर्नुहोला
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