is alloT .Make sare to justity all answers-shem all merhClosed bhook and notes-s
ID: 3738105 • Letter: I
Question
is alloT .Make sare to justity all answers-shem all merhClosed bhook and notes-shatshet 18 points) Use the following data declarations. Assume that the offset of wordVal is 00000000h: and calcilators I. data wordVal word 1000h,2000h,3000h,4000h dwordVal dword 11112222h, 12341234h, 12345678h pntr dword dword Val Show the value of the Jinal destination operand after each of the following code fragments has executed f any instruction's is invalid, indicate "INV" as the answer and briefly explain why) a. mov esi,3 inc esi mov ax, [wordVal+esi] answer ax- b. mov ax, [wordVal+6 xchg ax, [wordVal+4] mov [wordVal+61, ax answer ax wordVal+6 c. mov eax, 11223344h mov esi,offset dwordVal +8 answer eax- mov eax,(esi] esi- d. mov edi.pmtr ebx- answer add edi,4 mov ebx,[edi mov al, byte ptr [dwordVal +6] mov bx, word ptr [dwordVal +10] e. answer al- 2. 12 points] What will be the final value of eax and ecx after this code executes? count dword? mov eax,3 mov ecx,I LI: mov count,ecx mov ecx,2 L2: add eax,2 dec ecx loop L2 mov ecx,count loop Ll answerExplanation / Answer
1)
a)
mov esi,3 => esi = 3
inc esi => esi = 4
mov ax,[wordVal+esi] => ax = 3000h
b)
mov ax,[wordVal+6] => ax = 4000h
xchg ax,[wordVal+4] => ax = 3000h ; wordVal+4 = 4000h
mov [wordVal+6],ax => wordVal+6 = 3000h
c)
mov eax,11223344h =>eax = 11223344h
mov esi,offset dwordVal+8 => esi = address of dwordVal + 8
mov eax,[esi] => eax = 12345678h
d)
mov edi,pntr => edi = address of dwordVal
add edi,4 => edi = dwordVal + 4
mov ebx,[edi] => ebx = 12341234h
e)
mov al,byte ptr [dwordVal+6] => al = 12h
mov bx,word ptr [dwordVal+10] =>bx = 1234h
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.