This calculator takes as arguments the operation to be performed and returns a word result of the operation.
The program accepts numbers from 0 to 9 (written in words), and performs plus, minus and times operations. The number required is 3 words, separated by a space and ended with an enter.
Input: two plus three
Output: the result is six
Input: five minus eight
Output: the result is minus three
Input: nine times nine
Output: the result is eighty one
Moreover, my program handles exceptions and errors such as insufficient number of arguments or bad input data:
Input: two plus fiwe
Output: wrong input data
Input: two
Output: wrong number of arguments
for Linux OS
- Install dosbox:
# For Debian/Ubuntu-based systems: sudo apt install dosbox # For Fedora/RHEL/CentOS systems: sudo dnf install dosbox # For Arch-based systems: sudo pacman -S dosbox
- Run dosbox
dosbox
- Mount C in word-calculator-asm directory:
Z:\> mount c <path-to-directory> Z:\> c:
- Do this:
C:\> masm calc; C:\> link calc; C:\> calc
- Now you can introduce your equation 🌝