Week10chapter9 - Week 10 Chapter 9 Questions 1. The REPE...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Week 10 Chapter 9 Questions 1. The REPE prefix does which of the following? a. repeats an instruction while the Zero flag is clear b. repeats an instruction while the Zero flag is set c. repeats an instruction while the Carry flag is clear d. repeats an instruction while the Carry flag is set 2. If a bubble sort requires 0.2 seconds to sort an array of 1,000 elements, how many seconds will it require to sort 10,000 elements? Hint: bubble sort is an O(n 2 ) algorithm. a. 2 seconds b. 20 seconds c. 200 seconds d. 4 seconds 3. Which instruction causes the ESI and EDI registers to be incremented by the MOVSB instruction? a. CLC b. REP c. STD d. CLD 4. The MOVSB instruction uses which register as the source operand? a. ESI b. EDI c. EAX d. ECX 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
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5. To which label will the program jump in Example 1? a. L1
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Week10chapter9 - Week 10 Chapter 9 Questions 1. The REPE...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online