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

15. What will be the final value of EAX after this code fragment executes? mov e

ID: 3542123 • Letter: 1

Question

15. What will be the final value of EAX after this code fragment executes?

  mov   eax,5

  mov   ecx,5

Tag:

  add   eax,5

  loop Tag

a.  5

b. 10

c. 15

d. 25

e. 30

16. Select the answer choice that best implements the following expression.  Do not permit dword1,  ECX, or EDX to be modified:

eax = -dword1 + (edx - ecx) + 1

a.

mov eax,dword1

neg eax

sub edx,ecx

add eax,edx

inc eax

b.

mov eax,dword1

neg eax

mov ebx,edx

sub ebx,ecx

add eax,ebx

inc eax

c.

neg dword1

mov ebx,edx

sub ebx,ecx

add eax,ebx

inc eax

d.

mov eax,dword1

mov edx,ebx

sub ebx,ecx

add eax,ebx

inc eax

17. Use the following data for this question:

word1  WORD 1000h,2000h,3000h,4000h,5000h

dword1 DWORD 10000h,20000h,30000h,40000h

What is the final value of AX after this code has executed?

  mov esi,OFFSET word1

  mov ecx,5

  mov eax,100h

L1:    add ax,[esi]

  add ax,16

  add esi,TYPE word1

  Loop L1

a. F150h

b. 0150h

c. F016h

d. 0016h

18. Use the following data for this question:

word1  WORD 1000h,2000h,3000h,4000h,5000h

dword1 DWORD 10000h,20000h,30000h,40000h

What is the final value of AX after this code has executed?

  mov edx,OFFSET word1+8

  mov ecx,2

  mov ax,0

L1:    mov ax,[edx]

  add ax,20h

  sub edx,4

  Loop L1

a. 8040h

b. 9040h

c. 4020h

d. 3020h

19. Use the following data for this question:

word1  WORD 1000h,2000h,3000h,4000h,5000h

dword1 DWORD 10000h,20000h,30000h,40000h

Suppose we want EAX to contain the sum of the dword1 array when the following (incomplete) code finishes executing:

1:     mov edi,OFFSET dword1

2:     mov ecx,LENGTHOF dword1

3:     ?

4:     ?

5:     ?

6:     loop L1

Which of the following choices would best fill in lines 3, 4, and 5?

a.

3:     mov eax,[edi]

4: L1:  add  eax,dword1

5:     add edi,2

b.

3:     mov eax,0

4: L1:  add  eax,[edi]

5:     add edi,TYPE dword1

c.  

3:     mov eax,0

4: L1:  add  eax,[edi]

5:     add edi,2

d.  

3:     mov DWORD PTR [edi],0

4: L1:  add  eax,[edi]

5:     add edi,TYPE dword1

20. Use the following data for this question:

dword1 DWORD 10h,20h,30h,40h

What is the final hexadecimal value of EAX after this code fragment executes?

mov edx,8

mov eax,dword1[edx]

a. 00000010h

b. 20000000h

c. 00300000h

d. 00000030h

Explanation / Answer

16)b 17)b 18)d 19)b 20)d

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