Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assembly Language: Fill in the blanks. a. If EAX initially contains the value F0

ID: 669708 • Letter: A

Question

Assembly Language: Fill in the blanks.

a. If EAX initially contains the value F0F1F2F3h, and then the instruction

movsx ax, ah is executed, what values will the AX and EAX registers contain afterward?

AX contains _______________h (Write your answer in hexadecimal.)

EAX contains _______________h (Write your answer in hexadecimal.)

b. What value will the AX and BX registers contain after the following code executes?

mov ax, 20

mov bx, 60

dec ax

sub bx, ax

inc bx

mov ax, bx

AX contains ____________

BX contains ____________

Explanation / Answer

a)

MOVSX command will move 16 bit signed bits to 32 bit register...


F0F1F2F3 -----------> 1111 0000 1111 0001 1111 0010 1111 0011

movsx ax, ah ----.This statement will move 16 digits to ax
so ax = 1111 0010 1111 0011 == F2F3h
Eax = 1111 0000 1111 0001 == F0F1h

---------------------------------------------------------------------------------------------------------

b)

mov ax, 20 -----------> ax conatain 14h
mov bx, 60 -----------> bx conatain 3Ch
dec ax ----------> after decrementing ax coantains 13h
sub bx, ax ----------> After si=ubtraction bx contains 29h
inc bx ----------> after incrementing bx contains 28h
mov ax, bx -----------. after moving bx to ax ...ax conatins 28h
AX contains 28h
-------
BX contains 28h
---------

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote