Strings Flashcards

1
Q

Strings may have an actual value _______ than the total numbers of cells declared.

A

less

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Strings operands use ___ and ___ registers.

A

RSI and RDI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

As part of execution, string instructions automatically __________________________ the index registers used by them.

A

update (increment or decrement)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The direction of string processing (forward or backward) is controlled by the ____________.

A

Direction flag

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

If the direction flag is clear (DF = 0). string operations proceed in ________ direction.

A

forward (from head to tail)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Two instructions to explicitly manipulate the direction flag:

A

std: set direction flag (DF = 1)
cld: clear direction flag (DF = 0)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

String instructions can accept a ________ ________ to repeatedly execute the operation.

A

repetition prefix

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Unconditional repeat prefix which causes the instruction to repeat according to the value in the RCX register.

A

rep

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Operations similar to that of rep except that repetition is also conditional on the zero flag. Stops the repetition when ZF is 0.

A

repe / repz

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Operations similar to that of rep except that repetition is also conditional on the zero flag. Stops the repetition when ZF is 1.

A

repne / repnz

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Copies the value from the source string to the A register

A

Load a String (LODS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Copies the value from the A register to the destination string (RDI)

A

Store a string (STOS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Compares the two bytes, words, doublewords, or quadwords at RSI and RDI and sets the flags.

A

Compare strings (CMPS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

CMPS performs: ___ - ___ and sets the flags according to the result.

A

RSI - RDI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Useful in searching for a particular value or character in a string.

A

Scanning a String (SCAS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly