Using fasm assembler for Windows, write an x86 assembly program that
converts a user-entered integer from -100 to 100 to text.
Submit your .asm source code file on Ecampus under the "Submit Homework" menu option.
Here is an algorithm I recommend:
1. Ask user to enter a number and store into [Num]
2. If number is less than 0, output "negative " and change it to positive
3. Print all the exceptions - check if number is 100, 0, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19. If so, output the number and finish
4. Divide number by 10 and store answer into [Quotient] and [Remainder]
5. Compare Quotient to 20, 30, 40, 50, 60, 70, 80, 90 and output ten's digit -
e.g. "twenty "
6. Compare Remainder to 1, 2, 3, 4, 5, 6, 7, 8, 9 and output one's digit - e.g.
"five"
7. Jump to start to repeat entire program
Example output
This x86 assembly
program converts an integer to text.
Enter an integer from -100 to 100: 73
seventy-three
Enter an integer from -100 to
100: -100
negative one hundred