Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 !!
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 executionStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started