Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions A SIMPLE CALCULATOR/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
The journey here will let you dive into the basic arithematic applications like addition,subtraction, multiplication, division using MIPS.

Contributions to extend the functionality is open-heartedly welcomed.



Trying to make my first commit.
41 changes: 26 additions & 15 deletions A SIMPLE CALCULATOR/calc.s
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ main:
# Input 1st integer.



li $v0 ,5
syscall
move $t0,$v0



Expand All @@ -47,7 +49,9 @@ main:




li $v0 ,5
syscall
move $t1,$v0


#**********************************************************************************************************************
Expand Down Expand Up @@ -84,10 +88,18 @@ main:

#********************************************************************************************************************************
# Addition Functon.
addition:
addition:

#Implement addition function (hint: use for loop)





add $a0,$t0,$t1

li $v0, 1
syscall




Expand All @@ -100,22 +112,21 @@ main:
j menu # Control goes back to menu function.

# Subtraction Functon
subtraction:
#subtraction:

#Implement subtraction function (hint: use for loop)


#sub $a1,$t0,$t1

#li $v0, 1
#syscall







j menu
#j menu

# Multiplication Function
multiplication:
#multiplication:

#Implement multiplication function (hint: use for loop)

Expand All @@ -126,10 +137,10 @@ main:



j menu
#j menu

# Division Function
division:
#division:

#Implement division function (hint: use for loop)

Expand All @@ -141,7 +152,7 @@ main:



j menu
#j menu
#********************************************************************************************************************************

# Function To Generate New Numbers.
Expand Down