Just wanted to say I'm really appreciating this video series. Amell, thanks for making this. I have to work on a MIPS program for a school project and this is saving me a TON of time on ramping up to where I have enough of a base to get the project done.
Sir /Mate Amell , Thank you Indeed for saving my grades and time, You deserve more than a Thanks to be honest, I really can't express how did these tutorials help me understand this university course, You are WAYYY better than my instructor. Wishing you all the best in life. Thanks Again!
thanks for your videos - I had problems with it in my university because our prof just said look in the internet for it and I found your channel and you explain it good and in detail so that I understand it
Hi Amell, I just watched the entire series of MIPS tutorial that you have uploaded on your YT channel. Thanks for that , it really helped me a lot . I'd appreciate if you'd help me with my project, I have been trying to do it by my own but I'm struggling. The question is Write a MIPS Assembler and Real-Time Simulator (MARS) code that accepts two integers from the console and uses one procedure to add the two numbers and a second procedure to subtract the second integer from the first. The two procedures should be invoked within a loop with options such as 0 to add, 1 to subtract and 9 to exit. Ensure that both procedures are implemented. The code should display both the sum of the two integers and the difference between the first and the second integers on the console. a) Write two versions of the code, with the first using beq for loop implementation and the second adopting bne. b) Is there any difference in the execution times for the two versions of the code? If yes, why is this so? If no, suggest the reason why. I'd really appreciate your help. -Anelisiwe
hye guys im new to mips, could someone explain to me after jr $ra it would go to the main function right. So how does it goes to addi $t0 +1 if it always goes to jal printNumber first? im sorry i just dont understand the flow
Hi Amell! I'd like to thank you for doing this MIPS tutorial series. It's helped me a lot. I haven't gotten the ideia very well in college. So, now a question! Do you consider the following a good practice? Moving the contents of $t0 to an argument register ($a1) before calling the "printNumber" procedure and then inside the procedure move the contents of $a1 to an expression evaluation register like $v1 and do operations on top of that? That's what I've done. IN MAIN: move $a1, $t0 jal printNumber printNumber: move $v1, $a1 li $v0, 1 move $a0, $v1 syscall jr $ra
Vinícius Neto You're welcome, Vinicius. It would be good practice to follow the convention of using the $a registers for procedure arguments, but the $v registers are used for return values. Therefore, it's not necessary to store the argument in a $v register in this case.
Oh! Ok. I see that now. So I should operate on top of the argument registers? In a addNumbers procedure for example. I would pass 2 numbers to the procedure using $a1 and $a2 and then inside de procedure I'd do something like add $v1, $a1, $a2. Did I get it right?
how would you implement an if conditional statement inside the while loop. I tried implementing an if conditional statement and then try to addi a value to a register and it won't allow me. stays in a infinite loop. help.
Hello Luis. You can implement if conditionals in assembly by using the branching instructions (i.e., beq, blt, etc) with labels. For example, you can create a while loop like the one I created in the video. Then, once you've tested that the while loop is working properly, you should use branching instructions that will jump to a specific label if a certain condition is true. If you need more assistance, please show me your code.
Firstly, thanks so much for the tuts! You are awesome man! I haven't watch the next videos, so i am wondering about how we can exit the while loop only not the program with the tag exit?
What if you wanted to have an array of 100 elements with each element having a unique value o.O? would be tedious to use sw 100 times and increment the index 100 times.
There are more ways to initialize an array. Another way is: myArray: .word 45, 34, 44, 34, 54, 43, 34, 78 That declares an array of 8 integers with a unique value.
J jumps back into the loop until the condition is met and b just automatically jumps to a label with no regards for registers or conditions. B will go there every time
AHMED. HELP ME, I HAVE POSTED A COMMENT REQUIRING YOUR HELP OF WRITING A MIPS PROGRAM THAT TAKES MY NAME (DANIEL) AND PRINTS IT OUT A CHARACTER AT AT TIME. PLEASE. MY LIFE DEPENDS ON IT.
In my 21 years of life, I've never seen anyone more excited about MIPS loops than this guy lmao
You’ve only been alive for 21 years lol that’s why
@@stefanmilinkovic6433 lol hahah
@@stefanmilinkovic6433 derdim olsun, kadehler dolsun
@@stefanmilinkovic6433 Haha, and he was 23 when he uploaded the video...
Just wanted to say I'm really appreciating this video series.
Amell, thanks for making this. I have to work on a MIPS program for a school project and this is saving me a TON of time on ramping up to where I have enough of a base to get the project done.
I'm glad to know that. Happy coding!
Sir /Mate Amell , Thank you Indeed for saving my grades and time, You deserve more than a Thanks to be honest, I really can't express how did these tutorials help me understand this university course, You are WAYYY better than my instructor. Wishing you all the best in life. Thanks Again!
You are very welcome!
Thanks this is Utku from Turkey with your help I hope I will get good score in my midterm
Good Video !✨
You are very welcome, Utku!
the best mips explanation possible on UA-cam!
Thank you!
thanks for your videos - I had problems with it in my university because our prof just said look in the internet for it and I found your channel and you explain it good and in detail so that I understand it
You are welcome, Koraiko. Happy coding!
Thank you for this incredibly helpful video, Amell! Excellent delivery as always. :-D
You're welcome, Lenny!
Thank you for making these beneficial tutorials. It really helps.
+Mohammad Shabir You're welcome, Mohammad.
+Quasar Distant where are you from?
+Mohammad Shabir Originally from the Dominican Republic.
thanks a lot, im from Argentina and this saves my uni subjet haha
You're welcome. Happy coding!
Amell! You're saving my ass in my CE class!! Thanks!!
This man has single handedly saved me 1/4 of my degree
im a french student and i thank you for this video !
Je vous en pris. Happy coding!
You are amazing dude, this tutorial is the best
Thank you!
Great video man. Super helpful.
man im so fucked for my exam.... thanks for the video none the less
did u pass?
hope you passed bro
me too bro ;u
Amell you are awesome!
Thank you, Grover!
If I'm not mistaken, the inverse of less than ( < ) is greater than or equal to, ( bge ).
Excellent tutorial!
Thank you, Juan!
What if there are 2 conditions in a while loop? Like (i7)
How could i write this in MIPS?
Instead of j while, can you use b while? Or is that not conventional? Thanks!
j is a key word for jump, so you have to use just j
Hey Amell. I have a question. Are while loops written inside the main label or outside the main label like other procedures?
Hi Amell,
I just watched the entire series of MIPS tutorial that you have uploaded on your YT channel. Thanks for that , it really helped me a lot .
I'd appreciate if you'd help me with my project, I have been trying to do it by my own but I'm struggling.
The question is
Write a MIPS Assembler and Real-Time Simulator (MARS) code that accepts two integers from the
console and uses one procedure to add the two numbers and a second procedure to subtract the
second integer from the first.
The two procedures should be invoked within a loop with options such as 0 to add, 1 to subtract and
9 to exit. Ensure that both procedures are implemented. The code should display both the sum of
the two integers and the difference between the first and the second integers on the console.
a) Write two versions of the code, with the first using beq for loop implementation and the
second adopting bne.
b) Is there any difference in the execution times for the two versions of the code? If yes, why is
this so? If no, suggest the reason why.
I'd really appreciate your help.
-Anelisiwe
hye guys im new to mips, could someone explain to me after jr $ra it would go to the main function right. So how does it goes to addi $t0 +1 if it always goes to jal printNumber first? im sorry i just dont understand the flow
Excuse me amell can i get the link for the software you using for mips or if the software name is enough.... A response is highly appreciated..
Hi Roneet. The link is: courses.missouristate.edu/KenVollmar/mars/download.htm
You need Java installed on your computer to run the simulator.
Hi Amell! I'd like to thank you for doing this MIPS tutorial series. It's helped me a lot. I haven't gotten the ideia very well in college. So, now a question! Do you consider the following a good practice? Moving the contents of $t0 to an argument register ($a1) before calling the "printNumber" procedure and then inside the procedure move the contents of $a1 to an expression evaluation register like $v1 and do operations on top of that? That's what I've done.
IN MAIN:
move $a1, $t0
jal printNumber
printNumber:
move $v1, $a1
li $v0, 1
move $a0, $v1
syscall
jr $ra
Vinícius Neto You're welcome, Vinicius. It would be good practice to follow the convention of using the $a registers for procedure arguments, but the $v registers are used for return values. Therefore, it's not necessary to store the argument in a $v register in this case.
Oh! Ok. I see that now. So I should operate on top of the argument registers? In a addNumbers procedure for example. I would pass 2 numbers to the procedure using $a1 and $a2 and then inside de procedure I'd do something like add $v1, $a1, $a2. Did I get it right?
Yes, you are right. Good job.
Thanks!
You're welcome.
how would you implement an if conditional statement inside the while loop. I tried implementing an if conditional statement and then try to addi a value to a register and it won't allow me. stays in a infinite loop. help.
Hello Luis. You can implement if conditionals in assembly by using the branching instructions (i.e., beq, blt, etc) with labels. For example, you can create a while loop like the one I created in the video. Then, once you've tested that the while loop is working properly, you should use branching instructions that will jump to a specific label if a certain condition is true. If you need more assistance, please show me your code.
For branches I thought we only use regs?
Firstly, thanks so much for the tuts! You are awesome man!
I haven't watch the next videos, so i am wondering about how we can exit the while loop only not the program with the tag exit?
What if you wanted to have an array of 100 elements with each element having a unique value o.O? would be tedious to use sw 100 times and increment the index 100 times.
There are more ways to initialize an array. Another way is:
myArray: .word 45, 34, 44, 34, 54, 43, 34, 78
That declares an array of 8 integers with a unique value.
It took me a while to find a decent tutorial on MIPS thank you very much. By the way do you have any videos on the instruction sll?
Thank you.
I have a tutorial on sll: ua-cam.com/video/KI2e6_IMt_U/v-deo.html
really thank u bro
You are very welcome!
Very helpful!!! Thank you
You're welcome, Vianey. Happy coding!
would anyone tell me the difference between b and j ?it seems they do the same thing:go to a specific label
J jumps back into the loop until the condition is met and b just automatically jumps to a label with no regards for registers or conditions. B will go there every time
how can i add this numbers ???
Do you have the code?
What editor/IDE are you using? I would like to use it as well. I'm new to MIPs.
+Trung Nguyen Hi, Trung. I'm using Mars simulator. You can get it here: courses.missouristate.edu/KenVollmar/MARS/
He is using mars mips simulator
Good old ASSembly language making me learn outdated ass MIPS
thank you
You are welcome, Mark!
thank you so much
You're welcome!
may be nitpicky, but our first while loop would be more like:
i=0;
while (1) {
if (i > 10)
break;
i++;
}
+Stefan Jevtic Yes, that would be a suitable first while loop. :)
My professor said not to use bgt, blt, and bge because hardware for
it is true. he could do this: beq $t0, $t1, exit, where t1 contains number 11
Thank you mate
You're welcome, mate.
Nice videos , Nice accent......
Thank you, Shivendra. Happy coding!
Do u want to be my father please?
18/30 is coming
You're welcome. Happy coding!
te amo amell unas ganas de aprobar mañana
Te amo a ti tambien, Rosi. Deseo que apruebes manana.
Amell Peralta mañana te cuento como me fue! Sos el mejor 🥳
Que bien! Esperare tu mensaje. Si vienes a New York, me avisas y podemos ir a ver una pelicula.
Jajajaja tremendo amell encima de enseñarme una materia entera, me invita a ver una película en NY, sos lo más
Data for all the data and text for the instructions
voila!
Salamat po
Walang anuman.
Fourteen minutes? This tutorial sure does last for a long WHILE!
...I'll leave now
You should also check my assembly tutorials on recursion (Intro to Recursion and Recursive Factorial Program). :)
lmao plugging ur other videos
Solution is after like 8 minutes...
AHMED. HELP ME, I HAVE POSTED A COMMENT REQUIRING YOUR HELP OF WRITING A MIPS PROGRAM THAT TAKES MY NAME (DANIEL) AND PRINTS IT OUT A CHARACTER AT AT TIME. PLEASE. MY LIFE DEPENDS ON IT.