It is a calculator that can only perform "addition", "subtraction", "multiplication" operations. Division operation is not in this project but I am trying to add it.
Its use is simple as you can see above. You just select an operator and enter 2 digits.
Operators that need to be entered must be '+', '-', '*'.
You can follow the steps below to compile the project:
To get an Object file:
nasm -f elf64 calc.asm
To create an executable
ld -o calc calc.o
And now just run:
./calc
You should also have the macros.inc file in the same location.
I wanted to add the algorithm I created in the project here, in case anyone would like to examine the codes. Here is the algorithm:
I developed the project according to this algorithm. First, an operator input is taken from the user and operations are performed by jumping to different tags according to the selected operator.
Finally, by going to the label named '_printResult', the result of the operation is displayed and the program is terminated.
If an operator other than the operator specified in the program is entered, an error message is printed on the screen and the program is terminated directly.