Question
Suppose register dx is storing the following data: And the data segment has a variable named MONTH: .data MONTH BYTE ? And the goal of
Suppose register dx is storing the following data:
And the data segment has a variable named MONTH:
.data
MONTH BYTE ?
And the goal of the program is to move only the four bits for the month into the MONTH variable. Which of the options below is correct?
NOTE: The four bits for the month in dx are always storing a value between 1 - 12 (this is why exactly four bits are needed). When the four bits are moved to the MONTH variable, the value should ultimately be the same (i.e. if the four bits for the month in dx represent the number 12, then the number 12 should also be stored in the MONTH variable).
A.mov ax, dx shr ax, 5 and al, 00001111b mov MONTH, al |
B.mov ax, dx shl ax, 7 and ah, 11110000b mov MONTH, ah |
C.mov ax, dx shl ax, 7 or ah, 11110000b mov MONTH, ah |
D.mov ax, dx shr ax, 5 or al, 00001111b mov MONTH, al |
Step 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