2333 Exam 2

44 flashcardsby Carter
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
A value stored in the ebx register can be sign-extended into edx:ebx with the CDQ instruction.
False
2
The CMP instruction sets processor flags based on an implied ___ of two operands.
Subtraction
3
Performing division with DIV using 32-bit dividend implies that the dividend must be stored in ___.
EDX:EAX
4
When using the DIV instruction and a 64-bit divisor, the quotient is stored in [a] and the remainder in [b].
RAX:RDX
5
Before any conditional tests can be executed, two operands must be compared using the ___ instruction.q
CMP
6
10100100 ___ 11010101 = 01110001
XOR
7
The EQU directive can be used with the ___ to determine the length of a string.
Current Location Counter
8
IDIV can only accept 1 operands(s).
False
9
In a 32-bit program, the LOOP instruction automatically ___ the ecx register.
Decrements
10
Character literals are stored as ___ in memory.
ASCII
11
The JNGE instruction means to jump to a label if the first operand is ___ the second output.
Not Greater or Equal to.
12
The NEG instruction changes a value from positive to negative by converting it into its ___ representation.
Two's complement
13
In MASM, the first operand is the source and the second operand is the destination.
False
14
By default, integer literals are in base ___
10
15
A ___ valu is a value directly specified by the programmer rather than the result of an expression. For example, 10, 45h, 1001 1000b, 'A'Unin
Literal
16
The JNZ instruction can be used with signed operands.
True
17
A common way to detect whether a value is even or odd is to use the ___ operation to test if the last significant bit is set.
AND
18
The IMUL instruction can accept up to ___ operand(s)
3
19
The ___ instruction will move execution to a different section of code regardless of any conditions.
JMP
20
Uninitialized variables are declared in the .bss section of a program in MASM.
False
21
Aligning data to ___ memory addresses can help the processor access data faster.
Even
22
Lables must be followed by a ___.
Colon
23
In MASM, the first operand is the destination and the second operand is the source.
True
24
The [a] instruction copies a values and extends the sign, while the [b] instruction copies a value and extends zeros.
MOVSX, MOVZX
25
The IDIV instruction can accept ___ operands(s).
1, 2, 3
26
Only ___ operands should be used when executing the JNA instruction.
1
27
Counter-based loops can be quickly written using the LOOP instruction, which uses the ___ as the counter.
CX/ECX/RCX
28
In order to implement branching in an Assembly program, you must use ___ to identify blocks of code.
Labels
29
In order to use the base-10 literal value 50 in hexadecimal value in MASM, you would specify it as ___
30
The ___ directive is used to declare a 32-bit signed integer variable in MASM.
SWORD
31
The semi-colon represents a multi-line comment in MASM
False
32
The NEG instruction converts a value into its one's complement.
False
33
IDIV can accept 1, 2, or 3 operands.
False
34
___ are assembler-specific commands that allow you to do many things, such as define variables, indicate memory segments, and so on. For example, .data, DWORD, PROTO, END.
Directives
35
The INC instruction takes a maximum of ___ operands.
1
36
The AND bitwise operation is commonly used for setting bits in a value.
False
37
The JMP instruction does not require any specific processor flags to be set.
True
38
The semi-colon represents a single-line comment in MASM.
True
39
When using a QWORD value as an operand for the MUL instruction, the result will be stored in ___.
RDX:RAX
40
The ___ character signifies a single-line comment in MASM.
Semi-colon.
41
in Assembly, you must always use two conditional jumps to test both the "if-case" and the "else-case".
False
42
Using the bitwise AND operation, the result of 1 AND 0 is ___.RD
0
43
The LOOP instruction preserves the counter value automatically so the programmer is free to use the counter register (cx/ecxcx) within the loop.
False
44
When using MASM, the first operand is the ___ operand.
Destination
Study all 44 cards for free