Chapter 9 & 10 Flashcards

1
Q

MOVSB, MOVSB, and MOVSD

A

Move the string BYTE, “”WORD, “”DWORD

Copies data from the memory location pointed to by ESI to the memory location pointed to by EDI

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

Direction Flag

A

Controls the inc or dec of ESI and EDI

DF = 0 - forward/increment
DF = 1 - backward/decrement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

CLD

A

Clear Direction Flag

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

STD

A

Set Direction Flag

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

Repeat Prefix

A

REP - inserted before MOVSB, MOVSW, etc.

ECX controls num reps

REPE(REPZ)
REPNE(REPNZ)

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

CMPSB, CMPSW, and CMPSD

A

Compare string byte, “”WORD, “”DWORD

Compares a memory operand pointed to by ESI to a memory operand pointed to by EDI

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

SCASB, SCASW, and SCASD

A

Scan string byte, WORD, DWORD

Compares a value in AL/AX/EAX to a byte, word, or DWORD addressed by EDI

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

LODSB, LODSW, LODSD

A

Load string byte,…

Loads a byte or word from memory at ESI into AL/AX/EAX respectively

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

Str_compare Procedure

A

Compares string1 and string2

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

Str_length Procedure

A

Calculates the length of a null-terminated string and returns the length in the EAX register

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

Str_copy Procedure

A

Copies a null-terminated string from a source location to a target location

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

Str_trim

A

Removes all occurrences of a selected trailing character from a null terminated string

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

Str_ucase Procedure

A

Converts a string to all uppercase characters

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

Base-Index Operand

A

Adds the values of two registers (called base and index), producing an effective address

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

Base-Index-Displacement Operand

A

Adds the base and index registers to a constant, producing an effective address

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

Structure

A

Template/pattern given to a logically related group of variables

Syntax:
Name STRUCT
Field declarations
Name ENDS

17
Q

Union

A

Same as structure except all fields begin at the same offset

18
Q

Macro

A

Named block of assembly statements

During the assembler preprocessing step, each macro call is expanded into a copy of the macro

19
Q

Default Argument Initializer

A

Automatically assigns a value to a parameter when a macro argument is left blank

Ex:
mWriteLn MACRO text:=

ENDM

20
Q

IFIDN and IFIDNI

A

Both compare two symbols and return true if they are equal

IFIDN is case sensitive

IFIDNI is case insensitive

21
Q

&

A

Substitution Operator

  • resolves ambiguous references to parameter names within a macro
22
Q

%

A

Expansion Operator

  • expands text macros or converts constant expressions into their text representations
23
Q

<>

A

Literal-text Operator

  • groups one or more characters and symbols into a single text literal
24
Q

!

A

Literal-character Operator

  • forces the preprocessor to treat a predefined operator as an ordinary character
25
Q

WHILE Directive

A

Repeats a statement block as long as a particular constant expression is true

Syntax:
WHILE constExpr
statements
ENDM

26
Q

REPEAT Directive

A

Repeats a statement block a fixed number of times

Syntax:
REPEAT constExpr
Statements
ENDM

27
Q

FOR Directive

A

Repeats a statement block by iterating over a comma-delimited list of symbols

  • each symbol in the list causes one iteration

Syntax:
FOR parameter

ENDM