Chapter 5. System Software Flashcards

1
Q

What is assembly language?

A
  • A low-level programming language that is closer to machine code.
  • Uses mnemonics to represent machine instructions.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the purpose of an assembler?

A
  • Translates assembly language code into machine code that the CPU can execute.
  • Converts mnemonics into binary instructions.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are mnemonics in assembly language?

A
  • Human-readable representations of machine instructions.
  • Examples: ADD (addition), SUB (subtraction), MOV (move data).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an opcode in assembly language?

A
  • The part of a machine instruction that specifies the operation to be performed.
  • Example: ADD in the instruction ADD R1, R2.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are operands in assembly language?

A
  • The part of a machine instruction that specifies the data or memory locations involved.
  • Example: R1 and R2 in the instruction ADD R1, R2.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the difference between immediate addressing and direct addressing?

A
  • Immediate addressing: The operand is a constant value within the instruction.
  • Direct addressing: The operand is the address of the data in memory.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the function of the Instruction Set?

A
  • A set of instructions that a CPU can execute.
  • Defines the operations, addressing modes, and data types supported.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the difference between a label and a comment in assembly language?

A
  • Label: A symbolic name for a memory address.
  • Comment: An annotation in the code for clarification, not executed by the assembler.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the advantages of using assembly language?

A
  • Provides greater control over hardware.
  • Efficient in terms of execution speed and memory usage.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the disadvantages of using assembly language?

A
  • Difficult to learn and write.
  • Less portable compared to high-level languages.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the purpose of a register in assembly language?

A
  • Used to store data temporarily during program execution.
  • Faster to access than memory locations.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the role of the Program Counter (PC) in assembly language?

A
  • Holds the address of the next instruction to be executed.
  • Automatically incremented after each instruction fetch.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are addressing modes in assembly language?

A
  • Ways of specifying data or memory locations in instructions.
  • Examples: Immediate, Direct, Indirect, Indexed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the difference between a high-level language and assembly language?

A
  • High-level language: Easier to write and understand, more abstract.
  • Assembly language: Closer to machine code, provides more control over hardware.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a macro in assembly language?

A
  • A sequence of instructions that can be reused in the code.
  • Defined once and used multiple times to save repetition.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a subroutine in assembly language?

A
  • A set of instructions designed to perform a specific task.
  • Can be called from multiple places in the program.
17
Q

What is the purpose of the Stack Pointer (SP) in assembly language?

A
  • Points to the top of the stack in memory.
  • Used to manage function calls and local variables.
18
Q

What are the typical uses of assembly language?

A
  • Writing firmware or operating systems.
  • Performance-critical applications where low-level hardware control is needed.
19
Q

What is the function of the Accumulator (ACC) in assembly language?

A
  • A register used to store intermediate results of arithmetic and logic operations.
  • Commonly used in older CPU architectures.
20
Q

What is the role of the Linker in assembly language programming?

A
  • Combines multiple object files into a single executable.
  • Resolves references between different modules or libraries.