subject

The objective of this exercise is to write a program that will read a decimal digit d from the keyboard convert the ascii code of a digit d into the value v of d, and store v in the register d you must use the function readchar to input a decimal digit d from the keyboard. as described above, the function readchar will return in the register al the ascil code of the decimal digit d. we assume that the user will input only decimal digits ('0' to ). therefore, the register al will contain the ascii code of a decimal digit'0' to '9. i. e., 30h to 39h. you do not have to test al. your program must store in the register dl the value of the digit. example: if the user enters the digit ‘4', al will contain the ascii code 34h. your program must store in dl the value of the digit 4, ie., the value 04h. ultimately, dl 04h. programming exercise 4 (24 points): the objective is to write a program that implements the function readhexbyte to input from the keyboard a byte (i. e., two digits) and store it in the register al. you must write the program to implement the function readhexbyte. in order to achieve this, you must read consecutively two decimal digits from the keyboard (use readchar for each digit). we assume that the user will enter only two decimal digits (i. e. '0' to 9) the first digit entered will be set as the most significant nibble of al and the second digit entered will be set as the least significant nibble of al. process appropriately the two characters and store in al the value meant by the user. example: suppose the user enters the digit 9' followed by the digit '4'. this means that the user means the byte 94h. your program must ultimately store in al the value 94h (1001 0100)2. the digit '9 "produced the most significant nibble (1001)2 and the digit '4' produced the least significant nibble (01002-

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:50
Before you enter an intersection on a green light make sure
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
Suppose you have 9 coins and one of them is heavier than others. other 8 coins weight equally. you are also given a balance. develop and algorithm to determine the heavy coin using only two measurements with the of the balance. clearly write your algorithm in the form of a pseudocode using the similar notation that we have used in the class to represent sorting algorithms
Answers: 1
question
Computers and Technology, 23.06.2019 04:10
2pointswho was mikhail gorbachev? oa. a russian leader who opposed a coupob. a polish leader who founded the labor union "solidarityoc. a soviet leader who called for a closer relationship with the unitedstates, economic reform, and a more open societyd. a soviet leader who called for more oppression in the soviet union
Answers: 3
question
Computers and Technology, 23.06.2019 22:30
Apart from confidential information, what other information does nda to outline? ndas not only outline confidential information, but they also enable you to outline .
Answers: 1
You know the right answer?
The objective of this exercise is to write a program that will read a decimal digit d from the keybo...
Questions
question
Social Studies, 06.11.2020 20:30
question
Mathematics, 06.11.2020 20:30
question
Social Studies, 06.11.2020 20:30
question
Mathematics, 06.11.2020 20:30
question
Mathematics, 06.11.2020 20:30
question
Mathematics, 06.11.2020 20:30
question
Social Studies, 06.11.2020 20:30
Questions on the website: 13722362