📄
Introduction to MIPS
Setting up and understanding MIPS ISA.
This section covers the following topics
Open
Main Documentation : Click Here
# 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
syscallOpen
Main Documentation : Click Here
Open
Main Documentation (Integer) : Click Here
| Topic | Sample Code Link |
|---|---|
| Reversing 2 digit number | Sample Code |
| Calculating Average Marks | Sample Code |
| Finding Spy Number | Sample Code |
Open
Main Documentation : Click Here
| Topic | Sample Code Link |
|---|---|
| Fahrenheit to Celsius | Sample Code |
| Maximum and Minimum in Float Array | Sample Code |
| Round off to n digits | Sample Code |
Open
Main Documentation : Click Here
| Topic | Video Link | Sample Code Link |
|---|---|---|
| Introduction to Integer Arrays | Video | Sample Code |
| Sum of Elements of an Array | Video | Sample Code |
| Greatest Element in Array | Video | Sample Code |
| Merge 2 Sorted Arrays | Video | Sample Code |
| Highest and Lowest occurrence of an element in an array | Video | Sample Code |
| Binary Search | Video | Sample Code |
| Quicksort | Video | Sample Code |
Open
Main Documentation : Click Here
Sample Code:
| Topic | Sample Code Link |
|---|---|
| Taking Input | Sample Code |
| Printing a Matrix | Sample Code |
| Sum of Two Matrices | Sample Code |
| Topic | Video Link | Sample Code Link |
|---|---|---|
| Input/Output of Strings | Video | Sample Code |
| Traversal of Strings (Advanced string operations) | Video | Sample Code |
| Length of String | Video | Sample Code |
| Palindrome Check | Video | Sample Code |
| Concatenation of strings | Video | Sample Code |
| Topic | Video Link | Sample Code Link |
|---|---|---|
| Loops | ||
| LowerCase to UpperCase | Code | |
| Procedure Calling | ||
| Sum of two numbers | Code | |
| Product of two numbers | Code | |
| Maximum of four numbers | Code | |
| Factorial of a number | Code | |
| Recursion Using JAL | ||
| Binary search with recursion | Code | |
| Factorial recursion | Code | |
| Find exponent recursively | Code | |
| Sum of first N natural numbers | Code |