A community for students.
Here's the question you clicked on:
← 55 members online
 0 viewing
liliy
 3 years ago
how do program fibbonocci sequence in MIPS:
.data
msg: .asciiz "enter a number"
.text
main:
top:
la $a0,msg
li $v0 , 4 #printing the prompt
syscall
li $v0, 5 #read integer. from user
syscall
add $a0,$v0,$zero
jal fib
add $a0,$v0,$zero
li $v0,1
syscall
li $v0, 10
syscall
fib:
#a0=y
#if (y==0) return 0;
#if (y==1) return 1;
# else: return fib(y1)+fib(y2)
liliy
 3 years ago
how do program fibbonocci sequence in MIPS: .data msg: .asciiz "enter a number" .text main: top: la $a0,msg li $v0 , 4 #printing the prompt syscall li $v0, 5 #read integer. from user syscall add $a0,$v0,$zero jal fib add $a0,$v0,$zero li $v0,1 syscall li $v0, 10 syscall fib: #a0=y #if (y==0) return 0; #if (y==1) return 1; # else: return fib(y1)+fib(y2)

This Question is Closed
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.