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. A stone is thrown horizontally from the top of a 20 m high building with a speed of 12 m/s. It hits the ground at a distance R from the building. Taking g = 10 m/s2 and neglecting air resistance will give :

  2. A sphere of volume V is made of a material with lower density than water. While on Earth, it floats on water with its volume f1V (f1 < 1) submerged. On the other hand, on a spaceship accelerating with acceleration a < g (g is the acceleration due to gravity on Earth) in outer space, its submerged volume in water is f2V. Then:

  3. A railway wagon (open at the top) of mass M1 is moving with speed v1 along a straight track. As a result of rain, after some time it gets partially filled with water so that the mass of the wagon becomes M2 and speed becomes v2. Taking the rain to be falling vertically and the water stationery inside the wagon, the relation between the two speeds v1 and v2 is :

  4. Consider the following statements:

    1. Distance between the longitudes becomes zero on North Pole and South Pole.

    2. Distance between the longitudes is maximum on the Equator.

    3. Number of longitudes is more than number of latitudes.

    Which of the statements given above is/are correct?

  5. One block of 2⋅0 kg mass is placed on top of another block of 3⋅0 kg mass. The coefficient of static friction between the two blocks is 0⋅2. The bottom block is pulled with a horizontal force F such that both the blocks move together without slipping. Taking acceleration due to gravity as 10 m/s2, the maximum value of the frictional force is :

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