subject
Computers and Technology, 13.08.2021 04:10 liv467

Using x86 assembly language, 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 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 outputs
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
File Edit Search Run Options Help
format PE console
include win32ax. inc!
start:
ask user to enter a number
mov [Num), -25
print negative is less than 0
cmp [Num], o
jge positive
cinvoke printf,
negative neg [Num]
positive;
mov EAX, [Num]
cda
mov EBX, 10
idiv EBX
mov [Q], EAX
mov [R], EDX
twenty
cmp [Q), 2
jne thirty
cinvoke printf, "twenty"
invoke Sleep, -1

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:00, littleprinces
Your task this week is to write a very simple spam classifier in python. it will classify messages as either spam (unwanted) or ham (wanted). the program will have a set of spam_words, words that are known to appear in spam messages. that set is included in the template file spam. pypreview the document. you will also define a spam threshold which reflects the allowed percentage of spam words in the message. you'll compute a 'spam indicator', which is the ratio of spam words to the total number of unique words in the message. if the spam indicator exceeds the spam threshold, the message is classified as spam. otherwise it is classified as ham. we'll assume that the spam threshold is a constant and has a value of 0.10. your program will prompt the user for a message and then will print the corresponding spam indicator with two decimal digits and the corresponding classification (spam or ham). the program will be case insensitive. the spam words are detected whether they are in lower case or upper case or mixed case. each word, spam or not, is counted once (even if it appears multiple times in the message.) the program will remove punctuation from the message before identifying the words and computing the spam indicator. for example '! ' must be identified as the spam word 'now'.
Answers: 3
image
Computers and Technology, 22.06.2019 11:00, loveworld3798
When working with a team you should always do the following, except? question 3 options: be dependable and trustworthy be sensitive to others feelings do your fair share critique members of the group
Answers: 2
image
Computers and Technology, 23.06.2019 01:20, sosick90501
Write a function balancechemical to balance chemical reactions by solving a linear set of equations. the inputs arguments are: reagents: symbols of reagents in string row array products: symbols of products in string row array elements: elements in the reaction in string row array elcmpreag: elemental composition of reactants in two dimensional numeric array elcmpprdcts: elemental composition of prducts in two dimensional numeric array hint: the first part of the problem is setting up the set of linear equations that should be solve. the second part of the problem is to find the integers from the solution. one way to do this is to mulitiply the rational basis for the nullspace by increasing larger integers until both the left-and right-side integers exist. for example, for the reaction that involves reacting with to produce and : reagents=["ch4", "o2"]; products =["co2", "h2o"]; elements =["c","h", "o"] elcmpreag=[1,4,0;
Answers: 3
image
Computers and Technology, 23.06.2019 06:00, sebcbal
When is a chart legend used a. all the time b. whenever you are comparing data that is the same c. whenever you are comparing multiple sets of data d. only for hand-drawn charts
Answers: 2
You know the right answer?
Using x86 assembly language, Write a program that converts an integer from -100 to 100 to text.

Questions in other subjects:

Konu
Mathematics, 05.08.2021 04:20
Konu
English, 05.08.2021 04:20