Answered step by step
Verified Expert Solution
Link Copied!

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 !!

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

=+to live and work wherever he or she wants?

Answered: 1 week ago

Question

=+How will this affect the recruiting process?

Answered: 1 week ago