[Show all top banners]
Back to: Computer/IT Refresh page to view new replies
 MIPS programming HELP !
[VIEWED 1720 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 30 days
Recommended Popular Threads Controvertial Threads
What are your first memories of when Nepal Television Began?
nrn citizenship
Travelling to Nepal - TPS AP- PASSPORT
काेराेना सङ्क्रमणबाट बच्न Immunity बढाउन के के खाने ?How to increase immunity against COVID - 19?
TPS Work Permit/How long your took?
मन भित्र को पत्रै पत्र!
Informatica consultancy share
Travelling on TPS advance travel document to different country...
Are you ready to know the truth?
Thank you for the sajha policy
Nepali doctors future black or white usa ?
चितवनको होस्टलमा १३ वर्षीया शालिन पोखरेल झुण्डिएको अवस्था - बलात्कार पछि हत्याको शंका - होस्टेलहरु असुरक्षित
महँगो अण्डाको पिकल्प : कुखुरा र खोर भाडामा लिने
Does the 180 day auto extension apply for TPS?
TPS Renewal Reregistration
Why is every youths leaving Nepal? Why are not youths entering politics and serving the country, starting business etc?
Is money sent to support family tax deductible?
Send Parcels from USA to Nepal & Worldwide.
Another Song Playing In My Mind
हेर अमेरिकामा नेपालीहरुको बेज्जत
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