Skip to content

Welcome to the MIPS Guide

This section covers the following topics

Setting up MARS ​

Main Documentation : Click Here

View on Youtube

Sample Code
asm
# Program File: Tutorial1.asm
# Written by:   MoSaad
# Date Created: 10/05/2023
# Description:  Tutorial program to introduce MARS simulator  including: breakpoints, single-stepping, and register and memory windows.
#-----------------------------------------------------------
#-----------------------
# Declare some constants
#-----------------------
.data
string1: .asciiz "Welcome to Hardware Lab at NIT Calicut\n"
string2: .asciiz "Hello World \n"
string3: .asciiz "\nLoop #"
#------------------
# Main program body
#------------------
.text
main:
li $v0,4
la $a0,string1
syscall
la $a0,string2
syscall
li $t0, 1
loop:
li $v0, 4
la $a0,string3
syscall
li $v0,1
move $a0,$t0
syscall
addi $t0,$t0,1
bne  $t0,4,loop
#-----
# Halt
#-----
li $v0, 10
syscall

View on Github

Introduction to MIPS ​

Main Documentation : Click Here

View on Youtube

Basic Integer and String Handling ​

Main Documentation (Integer) : Click Here

View on Youtube

Sample Code: ​

TopicSample Code Link
Reversing 2 digit numberSample Code
Calculating Average MarksSample Code
Finding Spy NumberSample Code

Floating Point Handling ​

Main Documentation : Click Here

TopicSample Code Link
Fahrenheit to CelsiusSample Code
Maximum and Minimum in Float ArraySample Code
Round off to n digitsSample Code

Integer Array Handling ​

Main Documentation : Click Here

TopicVideo LinkSample Code Link
Introduction to Integer ArraysVideoSample Code
Sum of Elements of an ArrayVideoSample Code
Greatest Element in ArrayVideoSample Code
Merge 2 Sorted ArraysVideoSample Code
Highest and Lowest occurrence of an element in an arrayVideoSample Code
Binary SearchVideoSample Code
QuicksortVideoSample Code

2-D Integer Array Handling ​

Main Documentation : Click Here

View on Youtube

Sample Code:

TopicSample Code Link
Taking InputSample Code
Printing a MatrixSample Code
Sum of Two MatricesSample Code

String Handling (advanced) ​

TopicVideo LinkSample Code Link
Input/Output of StringsVideoSample Code
Traversal of Strings (Advanced string operations)VideoSample Code
Length of StringVideoSample Code
Palindrome CheckVideoSample Code
Concatenation of stringsVideoSample Code
TopicVideo LinkSample Code Link
Loops
LowerCase to UpperCaseCode
Procedure Calling
Sum of two numbersCode
Product of two numbersCode
Maximum of four numbersCode
Factorial of a numberCode
Recursion Using JAL
Binary search with recursionCode
Factorial recursionCode
Find exponent recursivelyCode
Sum of first N natural numbersCode