Chapter 5. System Software Flashcards
What is assembly language?
- A low-level programming language that is closer to machine code.
- Uses mnemonics to represent machine instructions.
What is the purpose of an assembler?
- Translates assembly language code into machine code that the CPU can execute.
- Converts mnemonics into binary instructions.
What are mnemonics in assembly language?
- Human-readable representations of machine instructions.
- Examples: ADD (addition), SUB (subtraction), MOV (move data).
What is an opcode in assembly language?
- The part of a machine instruction that specifies the operation to be performed.
- Example: ADD in the instruction ADD R1, R2.
What are operands in assembly language?
- The part of a machine instruction that specifies the data or memory locations involved.
- Example: R1 and R2 in the instruction ADD R1, R2.
What is the difference between immediate addressing and direct addressing?
- Immediate addressing: The operand is a constant value within the instruction.
- Direct addressing: The operand is the address of the data in memory.
What is the function of the Instruction Set?
- A set of instructions that a CPU can execute.
- Defines the operations, addressing modes, and data types supported.
What is the difference between a label and a comment in assembly language?
- Label: A symbolic name for a memory address.
- Comment: An annotation in the code for clarification, not executed by the assembler.
What are the advantages of using assembly language?
- Provides greater control over hardware.
- Efficient in terms of execution speed and memory usage.
What are the disadvantages of using assembly language?
- Difficult to learn and write.
- Less portable compared to high-level languages.
What is the purpose of a register in assembly language?
- Used to store data temporarily during program execution.
- Faster to access than memory locations.
What is the role of the Program Counter (PC) in assembly language?
- Holds the address of the next instruction to be executed.
- Automatically incremented after each instruction fetch.
What are addressing modes in assembly language?
- Ways of specifying data or memory locations in instructions.
- Examples: Immediate, Direct, Indirect, Indexed.
What is the difference between a high-level language and assembly language?
- High-level language: Easier to write and understand, more abstract.
- Assembly language: Closer to machine code, provides more control over hardware.
What is a macro in assembly language?
- A sequence of instructions that can be reused in the code.
- Defined once and used multiple times to save repetition.