From 2e289d27d130cb9f09c1877943699edbf690021b Mon Sep 17 00:00:00 2001 From: katycodess Date: Tue, 6 Oct 2020 23:41:54 +0530 Subject: [PATCH 1/2] first commit --- A SIMPLE CALCULATOR/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/A SIMPLE CALCULATOR/README.md b/A SIMPLE CALCULATOR/README.md index 7de5e9e..5f1e97e 100644 --- a/A SIMPLE CALCULATOR/README.md +++ b/A SIMPLE CALCULATOR/README.md @@ -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. From dda0c9fc53cd3c5f1551d0975ed86879f2ff5f8e Mon Sep 17 00:00:00 2001 From: katycodess Date: Wed, 7 Oct 2020 08:58:11 +0530 Subject: [PATCH 2/2] adding functionality in calculator --- A SIMPLE CALCULATOR/calc.s | 41 ++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/A SIMPLE CALCULATOR/calc.s b/A SIMPLE CALCULATOR/calc.s index 97e3f2e..0c6e49e 100644 --- a/A SIMPLE CALCULATOR/calc.s +++ b/A SIMPLE CALCULATOR/calc.s @@ -32,7 +32,9 @@ main: # Input 1st integer. - + li $v0 ,5 + syscall + move $t0,$v0 @@ -47,7 +49,9 @@ main: - + li $v0 ,5 + syscall + move $t1,$v0 #********************************************************************************************************************** @@ -84,10 +88,18 @@ main: #******************************************************************************************************************************** # Addition Functon. - addition: + addition: #Implement addition function (hint: use for loop) - + + + + + add $a0,$t0,$t1 + + li $v0, 1 + syscall + @@ -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) @@ -126,10 +137,10 @@ main: - j menu + #j menu # Division Function - division: + #division: #Implement division function (hint: use for loop) @@ -141,7 +152,7 @@ main: - j menu + #j menu #******************************************************************************************************************************** # Function To Generate New Numbers.