All Exams Test series for 1 year @ ₹349 only
Question

Pseudo instruction is given to___________.

The correct answer is
A ssembler

Understanding Pseudo Instructions and the Assembler

Pseudo instructions are special directives that are given to the assembler. Unlike actual machine instructions, pseudo instructions do not translate directly into executable machine code that the CPU understands. Instead, they tell the assembler how to perform its task, such as defining data, allocating memory, or controlling the assembly process itself.

Let's examine the roles of the different options provided to understand which one interacts with pseudo instructions.

Analyzing the Options

  • Loader: The loader is responsible for loading the executable program from secondary storage (like a hard drive) into the main memory so that it can be executed by the CPU. The loader works with the final executable code, not the source assembly code or assembler directives like pseudo instructions.
  • Linker: The linker combines one or more object files (generated by the assembler from assembly source code) and libraries into a single executable program. It resolves external references between different code modules. The linker operates on object code, not assembly source code containing pseudo instructions.
  • C Compiler: A C compiler translates source code written in the C programming language into machine code or assembly code. While compilers have their own directives (like preprocessor directives starting with '#'), pseudo instructions are specific to assembly language and are understood by the assembler, not a C compiler.
  • Assembler: The assembler is a program that translates assembly language code into machine code. Assembly language consists of mnemonics (like MOV, ADD) that correspond to machine instructions, as well as pseudo instructions (directives) that control the assembly process. Pseudo instructions tell the assembler things like how to define data (e.g., DB, DW, DD), reserve memory space (e.g., RESB, RESW, RESD), define symbols, or specify the start and end of the program. Therefore, pseudo instructions are specifically given to the assembler.

Conclusion on Pseudo Instructions

Based on the analysis, pseudo instructions are commands or directives meant for the assembler to guide it during the translation of assembly code into machine code. They do not generate executable instructions but rather help manage the assembly process, define data, and structure the program.

Therefore, pseudo instruction is given to the assembler.

Component Primary Function Interacts with Pseudo Instructions?
Loader Loads program into memory No
Linker Combines object files No
C Compiler Translates C code No (Has compiler directives, not pseudo instructions)
Assembler Translates assembly code to machine code Yes (Pseudo instructions are directives for the assembler)

Revision Table: Software Development Tools

Tool Input Output Role in Development
Compiler High-level source code (C, C++, Java, etc.) Assembly code or machine code (object code) Translates human-readable code to machine-executable code.
Assembler Assembly language code (mnemonics, pseudo instructions) Machine code (object code) Translates assembly language into binary machine instructions.
Linker Object files, libraries Executable program Combines object files and resolves external references.
Loader Executable program Program loaded into memory Loads the executable file into main memory for execution.

Additional Information: Directives vs. Instructions

It's important to distinguish between instructions and directives (like pseudo instructions) in assembly language:

  • Instructions: These correspond directly to operations performed by the CPU (e.g., adding numbers, moving data). The assembler translates each instruction mnemonic into a specific machine code opcode and operands.
  • Directives (Pseudo Instructions): These are commands for the assembler itself. They control how the assembler processes the assembly code, define data types, reserve memory, set up segments, or control listing output. They do not translate into executable machine code but influence the content or structure of the output object file or the assembly process. Examples include .DATA, .CODE, DW (Define Word), RESB (Reserve Byte), END.

Understanding the role of the assembler and its interaction with pseudo instructions is fundamental to understanding how assembly language programs are processed.

Was this answer helpful?

Important Questions from Miscellaneous

  1. The magazine in which Mahatma Gandhi mentioned what he wanted the Constitution to do is:

  2. Which gas shields the surface of the earth from ultraviolet radiation from the sun?

  3. Which event is marked as an Intangible Cultural Heritage of Humanity by UNESCO?

  4. Who has been conferred with the rank of the Commander of the Order of the British Empire in 2018?

  5. Who directead the film ‘Bhuvan Shome’?

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App