• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/46

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

46 Cards in this Set

  • Front
  • Back
What is an immediate operand?
a constant value or the result of a constant expression.
What is a register operand?
refers to data stored in registers. The register name is converted to a number and encoded within the instruction
What is a memory operand?
a reference to a location in memory. The memory address is encoded within the instruction, or a register holds the address of a memory location
What is a direct operand?
a named reference to storage in memory (a fixed memory location)
What is the syntax of a MOV instruction?
mov destination, source
In a MOV instruction, how many memory operands are permitted?
one
In a MOV instruction, can the operands be different sizes?
no
T or F:
The following is a permitted MOV instruction.
mov eip, count
FALSE
EIP is not a valid destination register
T or F:
The following is a permitted MOV instruction
.mov 56, count
FALSE an immediate operand cannot be a destination
T or F
:the MOVZX instruction, the destination must be a register.
TRUE
T or F:
The MOVZX instruction permits the source and destination to be different sizes.
TRUE
the destination must be equal to or larger than the source
When you copy a smaller value into a larger destination, the MOVZX instruction fills the upper half of the destination with _____ .
0s
T or F:
A signed value can be the source when using a MOVZX instruction.
FALSE
the source must be unsigned, and the destination must be a register
What is the difference between MOVZX and MOVSX?
MOVZX is for unsigned sources, and MOVSX is for signed sources
When you copy a smaller value into a larger destination, the MOVSX instruction fills the upper half of the destination with _____ .
1s if the value is negative or 0s is the value is positive. *NOTE* if value of register is in hex format, Fs are used instead of 1s!
T or F:
An unsigned value can be the source when using a MOVSX instruction.
FALSE
the source must be signed, and the destination must be a register"
When would you use MOVSX instead of MOV?
When the source and destination are unequal in size
T or F:
The MOVSX instruction permits the source and destination to be different sizes.
TRUE
the destination must be equal to or larger than the source
What does the XCHG instruction do?
exchanges the values of two operands
What are the operand restrictions of XCHG?
at least one operand must be a registry, no immediate operands are permitted, and operands must be the same size
What is the notation for an 8-bit registry operand?
reg8
What is the notation for an immediate value operand?
imm
What is the notation for a memory operand?
mem
What is added to the data label to produce and effective address?
constant offset
How is the location of the third value in a WORD array referenced?
[array+4] (offset + 2 + 2)
How is the location of the second value in a DWORD array referenced?
[array+4] (offset + 4)
The _____ instruction increases the destination operand by one.
INC
The _____ instruction decreases the destination operand by one.
DEC
When using ADD or SUB, how many memory operands are allowed?
one -- ADD and SUB follow the same operand rules as MOV
What does the NEG instruction do?
reverses the sign of the operand
When using NEG, if the operand is nonzero, will the carry flag be set?
yes
Does the MOV instruction affect flags?
no
Following an arithmetic operation, when is the zero flag set?
when the destination equals zero
Following an arithmetic operation, when is the sign flag set?
when the destination is negative
Following an arithmetic operation, when is the carry flag set?
when an unsigned value is out of range
Following an arithmetic operation, when is the overflow flag set?
when a signed value is out of range
Can the CPU distinguish between signed and unsigned integers?
no
The _______ flag is set when two positive operands are added and their sum is negative.
overflow
The _______ flag is set when two negative operands are added and their sum is positive.
overflow
What does the OFFSET return?
the distance, in bytes, of a label from the beginning of its enclosing segment
What does the PTR operator do?
overrides the default type of a label (variable), allowing access to part of the variable
What does the TYPE operator return?
the size, in bytes, of a single element of a data declaration
What does the JMP instruction do?
unconditionally jumps to a label
What does a LOOP instruction do?
creates a counting loop
What happens if ECX has a value less than zero while within a loop?
creates an endless loop -- the loop exits when ecx is equal to zero
If you have a nested loop, how do you protect the count of the outer loop?
store ecx in a variable or push it on the stack to retrieve after executing the inner loop