Uncategorized

use flat assembler, write a program that converts an integer from -100 to 100 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 OnesDigitThirty: Output “thirty” Jump to OnesDigitOnesDigit: 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 EndingTwo: Output “two” Jump to EndingExample outputsThis x86 assembly program converts an integer to text.Enter an integer from -100 to 100: 73seventy-threeEnter an integer from -100 to 100: -100negative one hundred