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

CHAPTE 12 . For each part of this problem, assume the \"before the requested aft

ID: 3701237 • Letter: C

Question

CHAPTE 12 . For each part of this problem, assume the "before the requested after" values Exercises 4.3 After Instruction EAX, EDX, CF, OF mul ebx al EAX: FF FF FFE4 EBX: 00 00 00 02 mul value EAX, EDX, CF, OF o) AX: FF FF FF E4 doubleword at value mul ax AX, DX, CF, OF AX: FF FF (d) AL: OF H: 4C mul bh mul bh imul ec:x imul ebx AX, CF, OF el AL: F BH: C4 AX, CF, OF EAX: 00 00 00 17 EAX, EDX, CF, OF EAX, EDX, CF, OF EAX, EDX, CF, OF EAX, EDX, CF, OF ECX: 00 00 00 B2 EAX: FF FF FFE4 EBX: 00 0004 C2 h) EAX: FF FF FF E4 doubleword at value:imul F FF F 34 ) EAX: FF FF FF F value imul eax 0 AL: OF BH: 4C (k) AL: FO BH: C4 imul bh AX, CF, OF () EAX: 0000 00 0A EBX: FF FF FF FC imul bh AX, CF, OF EDX: FF03 FF 01 (m) EAX: 00 00 00 OA imul ebx EAX, EBX, EDX, CF, OF EBX: FF FF FF FC EDX: FF 03 FF 01 mul ebx EAX, EBX, EDX CF0F

Explanation / Answer

a. EAX = FF FF FF E4

EBX = 00 00 00 02

mul ebx ; performs eax * ebx and stores result in edx:eax = 00000001 FF FF FF C8 , The upper have contains significant digits, therefore CF = 1.

After instruction:

EDX = 00 00 00 01 , EAX = FF FF FFC8, CF = 1 and OF = 0

d. AL= 0F BH= 4C

instruction :mul bh ; values in AL , BH are multiplied and result is stored in AX

0F * 4C = 0474

After instruction:

AX = 0474, CF = 0, OF = 0

g. EAX = FF FF FF E4

EBX = 00 00 00 C2

imul ebx ; it is a signed integer multiply. Therefore OF flag will be 1 if the EDX is not a signed extension of EAX, otherwise it will be 0

EAX * EBX = C1 FFFFEAC8, stored in EDX : EAX

After the instruction:

CF = 1,OF = 1,EDX = 00 00 00 C1, EAX=FFFFEAC8

h. EAX = FF FF FF E4

value = FF FF FF 3A

instruction :

imul value; eax * value is stored in edx : eax = FF FF FF 1E 00 00 18 00

After instruction:

EDX = FF FF FF 1E , EAX = 00 00 18 00, CF = 1, OF = 0