subject

Example 1 .data
var1 BYTE 10
var2 BYTE 20
var3 BYTE 30
.code
mov esi, OFFSET var2
mov edi, OFFSET var1
cmpsb
ja L1
jb L2
je L3
5.To which label will the program jump in Example 1?
a. L1
b. L2
c. L3
d. cannot be determined from the information given

6.In Example 1, where will ESI point after the CMPSB instruction executes?
a. at var1
b. at var2
c. at var3
d. cannot be determined from the information given

7.If var1 and var2 were changed to type SWORD in Example 1, what change(s) would have to be made to the instructions in the code segment?
a. change CMPSB to CMPSW
b. change CMPSB to CMPSD
c. change JA to JG, and change JB to JL
d. none of the above
Example 2
1: .data
2: str1 BYTE "1324A2342424",0
3: .code
4: mov edi, OFFSET str1
5: mov al,'A'
6: cld
7: repne scasb
8: mov bl,[edi]

8.In Example 2, assume that str1 is located at offset 00040010h. What will be the value of EDI after line 7 executes?
a. 00040010h
b. 00040013h
c. 00040014h
d. 00040015h
9.In Example 2, if we change line 6 to "std", what value will be moved to BL after line 8 executes?
a. ASCII code of "4"
b. ASCII code of "A"
c. ASCII code of "2"
d. cannot be determined
10. In Example 2, if we change line 7 to "repe scasb", what value will be moved to BL after line 8 executes?
a. ASCII code of "3"
b. ASCII code of "A"
c. ASCII code of "2"
d. cannot be determined
11.Which letter choice contains instructions that will fill all elements of arrayW with h?
arrayW WORD 50 DUP(?)
a.
mov ax,0h
mov edi, OFFSET arrayW
mov ecx, SIZEOF arrayW
cld
rep stosb
b.
mov ax,0h
mov edi, OFFSET arrayW
mov ecx, LENGTHOF arrayW
cld
rep stosw
c.
mov ax,0h
mov esi, OFFSET arrayW
mov ecx, SIZEOF arrayW
std
rep stosw
d.
mov ax,0h
mov esi, OFFSET arrayW
mov ecx, LENGTHOF arrayW
cld
repz stos
Example 3
1: .data
2: str1 BYTE "AAAX",0
3: str2 BYTE 10 DUP(0FFh)
4: .code
5: mov edi,0
6: L1: mov al,[str1+edi]
7: cmp al,0
8: je L2
9: mov [str2+edi],al
10: inc edi
11: jmp L1
12: L2:
After Example 3 executes, what value will be stored at offset [str2+4]?
a. 0FFh
b. ASCII code of "X"
c. 00h
d. cannot be determined
13. In Example 3, if we changed lines 7, 8, and 9 to the following, what value would be stored at offset [str2+4] after the loop finished?
7: mov [str2+edi],al
8: cmp al,0
9: je L2
a. 0FFh,
b. ASCII code of "X"
c. 00h
d. cannot be determined

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
Imagine that you have a friend who is starting a small business and is interested in using social media to spread the word. he is not certain that it is a good move, and has come to you for . would you advise him to use social media to advertise his business? why or why not? support you answer with information from the text.
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
Which of the following has not been attributed at least in part to social media a. drug addiction b. depression c. kidnapping d. murder
Answers: 2
question
Computers and Technology, 23.06.2019 11:30
The most accurate readings that you can take on an analog vom are when the meter's pointer is at the a. center scale. b. extreme right. c. near right. d. extreme left.
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
If you're using an existing powerpoint presentation that will receive new slides based on a word outline, select the a. slide that will appear after the new slides. b. first slide in the presentation. c. slide that will appear before the new slides. d. last slide in the presentation.
Answers: 2
You know the right answer?
Example 1 .data
var1 BYTE 10
var2 BYTE 20
var3 BYTE 30
.code
mov esi,...
Questions
question
History, 06.10.2021 14:00
question
Mathematics, 06.10.2021 14:00
question
Mathematics, 06.10.2021 14:00
question
English, 06.10.2021 14:00
question
History, 06.10.2021 14:00
question
Chemistry, 06.10.2021 14:00
Questions on the website: 13722363