Exam 2 Assembly Flashcards

(41 cards)

1
Q

The instruction SHL and SHR can be used on signed integers for bit shifting and preserve the sign

A

False

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

The instruction MUL preforms unsigned integer multiplication ad accepts 1,2, or 3 operands

A

False

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

The INC instructions takes a maximum of _operands

A

One

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

When using MASM, the first operand is the _____ operand

A

Destination

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

Symbolic constants can be used in MASM in lieu of variables when you have certain values in a program that never changes

A

True

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

Strings are stored as DWORD arrays

A

False, strings are stored as byte

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

The current location symbol in MASM is the dollar sign

A

True

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

A semi colon is used for single-line comments

A

True

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

The EQU directive can be used with the____ to determine the length of a string

A

Dollar sign

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

To get the address of an operand in MASM you can use the offset directive with the LEA instruction

A

False

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

Strings need to be null -terminated by using the literal value 0 as the last byte in MASM/NASM

A

True

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

The_____ directive is used to declare a 32 bit signed integer variable in MASM

A

sdword

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

IDIV can accept 1,2, or 3 operands

A

False

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

Labels must be followed___by

A

Colon

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

The instruction CWD converts the value in AX into DX:AX

A

True

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

In MASM to add a new line in a string it is represented by the____hexadecimal values

A

0dh, 0ah

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

___ are assembler specific commands that allow you todo many things, such as define variables, indicate memory segments, ad so on

18
Q

A variable that contains a memory address is an example of___addressing

19
Q

When using QWORD value as an operand for the MUL instruction, the result will be stored in____

20
Q

The IDIV instruction can accept___operands

21
Q

The NEG instructions changes a value from positive to negative by converting it into its____representation

A

Two’s complement

22
Q

An array is a collection of data spaced equally memory addresses based on the data type and is aliased to the first element

23
Q

Aligned data to ___ memory address can help the processor access data faster

24
Q

Preforming division with DIV using a 32-bit divided implies that the dividend must be stored in___

25
Instructions may not use operands
True
26
The LENGTHOF directive returns the numbers of elements in an array
True
27
Uninitialized variables are declared in the .bss section of the program in MASM
False
28
IMUL can accept 1, 2, or 3 operands
True
29
The IMUL instruction can accept __ operand(s)
One, two, or three operands
30
The colon (:) represents a single line comment in MASM
False
31
In the ADD and SUB instructions, the first and second operand is the destination and source, respectively
True
32
To represent a literal number as a hexadecimal literal value, we use the postfix radiax ‘o’
False
33
By default, integer literals are in base ___
10
34
A value stored in the EBX register can be sign extended into EDX:EBX with the CDQ instructions
False
35
When using MASM, the first operand is the ___ operand
Destination
36
A ___ value is a value directly specified by the programmer rather than the result if an expression. EX: ‘A’
Immediate
37
The directive DWORD is a 2-byte (16-bit) integer
False
38
Character literals are represented as __ in memory
ascii
39
The INC instruction takes a maximum of __ operands
One
40
In order to use the base - 10 value 50 as a hexadecimal value in MASM/NASM you would specify it as ___
32h
41
When using the DIV instructions and a 64-bit divisor, the quotient is stored in __ and the remainder in ___
Quotient: rax and remainder: rdx