chapter 3 -Assembly Language Fundamentals Flashcards

1
Q

Assembly language statements are divided into:

A) Procedures and Functions
B) Instructions and Directives
C) Loops and Conditions
D) Labels and Mnemonics

A

B) Instructions and Directives

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

Which of the following is an executable instruction?

A) TITLE
B) BYTE
C) MOV
D) END

A

C) MOV

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

Directives in assembly language:

A) Generate machine code
B) Allocate storage or define segments
C) Are executed at runtime
D) Are not case sensitive

A

B) Allocate storage or define segments

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

What does PROC indicate in assembly language?

A) Start of a code segment
B) End of a program
C) Start of a procedure
D) End of a data segment

A

C) Start of a procedure

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

Which directive specifies the end of the program?

A) END
B) TITLE
C) DATA
D) CODE

A

A) END

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

In a program template, the .code segment is:

A) Writable and executable
B) Only writable
C) Executable but read-only
D) Used for data declaration

A

C) Executable but read-only

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

The MOV instruction is used for:

A) Arithmetic operations
B) Transferring data
C) Subtracting data
D) Comparing values

A

B) Transferring data

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

What does the CALL instruction do?

A) Transfers control to a procedure
B) Compares two values
C) Moves data between registers
D) Sets flags in the CPU

A

A) Transfers control to a procedure

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

A two-operand instruction format includes:

A) Label, mnemonic, operand
B) Mnemonic, two operands, comment
C) Label, comment, data
D) Mnemonic, operand, directive

A

B) Mnemonic, two operands, comment

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

A WORD in assembly language refers to:

A) 1 byte
B) 2 bytes
C) 4 bytes
D) 8 bytes

A

B) 2 bytes

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

Which of these defines a signed 8-bit value?

A) BYTE
B) SBYTE
C) DWORD
D) QWORD

A

B) SBYTE

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

A string in assembly language is:

A) A null-terminated array of characters
B) A sequence of integers
C) A register containing characters
D) Limited to 4 characters

A

A) A null-terminated array of characters

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

The DUP operator is used to:

A) Define a procedure
B) Allocate space for an array
C) Compare two operands
D) Access memory addresses

A

B) Allocate space for an array

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

A symbolic constant is defined using:

A) BYTE
B) EQU
C) PROC
D) DATA

A

B) EQU

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

What does the $ operator represent in assembly language?

A) Start of a data segment
B) Current memory location
C) End of a procedure
D) Address of the next instruction

A

B) Current memory location

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

What is the purpose of DumpRegs?

A) Allocate registers
B) Display register contents
C) Clear register values
D) Initialize flags

A

B) Display register contents

17
Q

Which instruction is used to add two values in assembly?

A) MOV
B) CALL
C) ADD
D) DUP

18
Q

What is the first step in the assemble-link-execute cycle?

A) Debugging the code
B) Compiling the program
C) Writing the source program
D) Executing the machine code

A

C) Writing the source program

19
Q

In Little Endian systems, the least significant byte is stored:

A) At the highest memory address
B) At the lowest memory address
C) In the middle of memory
D) In registers only

A

B) At the lowest memory address

20
Q

What does the QWORD data type define?

A) 8-bit data
B) 16-bit data
C) 32-bit data
D) 64-bit data

A

D) 64-bit data

21
Q

What is the difference between an instruction and a directive?

A

An instruction is executable and generates machine code, while a directive provides information to the assembler (e.g., to allocate memory or define segments).

22
Q

What does the DUP operator do in assembly?

A

The DUP operator creates space for arrays or strings by duplicating a value or initializer.

23
Q

Define a null-terminated string in assembly language.

A

A null-terminated string is an array of characters followed by a 0 byte to indicate the end of the string.

24
Q

What is the purpose of the .data segment in an assembly program?

A

The .data segment is used for declaring and initializing variables and storing static data.

25
What is the significance of Little Endian order?
In Little Endian systems, the least significant byte is stored at the lowest memory address, reversing the order of multi-byte values.
26
Explain the purpose of DumpRegs.
DumpRegs displays the contents of all CPU registers and flags, useful for debugging.
27
How is a WORD defined in assembly language?
A WORD is a 16-bit data type, typically used for storing small integers or addresses.
28
What does the EQU directive do?
The EQU directive assigns a symbolic constant to a value or expression, allowing for easier readability and maintenance.
29
What is the purpose of the CALL instruction?
The CALL instruction transfers control to a procedure, saving the return address for later execution.