[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 1820 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 7 days
Recommended Popular Threads Controvertial Threads
Tourist Visa - Seeking Suggestions and Guidance
MAGA denaturalization proposal!!
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