14. Which of the following is a limitation of the normal use of the JMP (jump) i
ID: 3907329 • Letter: 1
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 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
Explanation / Answer
Answer is as follows :
a) The correct option is C i.e. you can only jump to a code label inside the current procedure.
b) The loop is working according to ECX counter , so the value of counter is 5. and EAX has intial value of 5.
So after performing Add operation on EAX according to given scenario , so we can add 5 to eax 5 times we get 30.
So correct option is E.
c) The correctt option is A, becasue in option B & C the EDX is modified by EBX and in option Dword is can't negated.
So correct option is A.
d) The value we get after calculations is 0150 h.
So the correct option is B.
e) For the given scenario, after calculations we get that the final value of AX is 3020 h.
So correct option is D.
f) The correcct option is B.
g) The final hexadecimal value of EAX after calculation we get is 00000030 h.
So correct option is D.
if there is any query please ask in comments..
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.