Question
14. Which of the following is a limitation of the normal use of the JMP (jump) instruction? a. There are no limitations. b. The destination
14. Which of the following is a limitation of the normal use of the JMP (jump) instruction?
a. There are no limitations.
b. The destination of a JMP instruction must be a code label within -128 and +127 bytes from the current instruction.
c. You can only jump to a code label inside the current procedure.
d. The destination of a JMP instruction must be a code label within -256 and +255 bytes from the current instruction.
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
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