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, 22.06.2019 01:10
When you reach a yield sign, yield to cross traffic and before you enter the intersection. a. flash your headlights b. wait for a signal c. wait five seconds d. wait for a safe gap
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
Me dangers of social media and the internetexplain what each means: 1) social media and phones have become an addiction.2) outside people have access to you all the time.3) cyberstalking4) cyberbullying5) catphishing6) viruses7) identity theft8) credit card fraud9) hacking10) money schemes
Answers: 1
question
Computers and Technology, 23.06.2019 12:50
Which syntax error in programming is unlikely to be highlighted by a compiler or an interpreter? a variable name misspelling a missing space a comma in place of a period a missing closing quotation mark
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
Perform an online search about the booting process of a computer and list all the steps
Answers: 2
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
English, 16.10.2019 06:40
question
Mathematics, 16.10.2019 06:40