Question: Microprocessor - Please solve it with the detials !! PART 2 - Programming (Code) (18 marks] For the following two problems, you may need the

Microprocessor - Please solve it with the detials !!

Microprocessor - Please solve it with the detials !! PART 2 -

PART 2 - Programming (Code) (18 marks] For the following two problems, you may need the following information: You need the following functions for INT 21H AH = 09H: for printing a string ended with $ ?? ?2?: for printing a single character AN 2011: for reading one character from the keyboard (user response) AH = 4CH: to end the program and exit to DOS ASCII codes: New line: use OAH or 10 Carriage Return: use ODH or 13 The numbers 0-9 in decimal is equivalent to 30H-39H in ASCII 8. Write an assembly program that consists of two segments. The first segment (SEG_ is a data segment holding the following variables: VAR1 VAR2 is a byte contains the value 88H is a byte contains the string 'O$' ont> ! 000. led 2 The second segment (SEG_CODE) is a code segment starting at address CS:0100H. This segment contains the code part which will do: a. Counts the number of ones (1's) of the value in the variable VAR1. And then saves the count into BL. (hint: use ROL and JNC instructions). b. Convert the count calculated in step (a) into ASCII. Then save it into the first location of the variable VAR2. c. Print on the terminal (screen) the value stored in VAR2. d. Your program should exit and return back to DOS when it finishes execution

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!