Either submit the source code files on Ecampus under the "Submit Homework" menu option, or demo the programs to the instructor during lab.
 

Using x86 assembly language, write a program that converts an integer (0-99) to text.


Below is a partial algorithm to convert an integer to text:
     idiv user's number by 10 and store eax into variable Quotient and edx into Remainder
     compare Quotient to 2 and jump to Twenty if equal;  compare Quotient to 3 and jump to Thirty if equal;  etc.
Twenty:
     Output "twenty"
     Jump to OnesDigit
Thirty:
     Output "thirty"
     Jump to OnesDigit
OnesDigit:
     compare Remainder to 1 and jump to One if equal;  compare Remainder to 2 and jump to Two if equal;  etc.
One:
     Output "one"
     Jump to Ending
Two:
     Output "two"
     Jump to Ending



Example output
This x86 assembly program converts an integer to text.

Enter an integer from 0 - 99: 73

seventy-three