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

Which of the following is not an example of pseudo‐instruction?

The correct answer is

ORG

Understanding Pseudo-Instructions in Assembly Language

In assembly language programming, instructions can be broadly categorized into two types: machine instructions and pseudo-instructions (also known as assembler directives). Machine instructions are commands that the computer's processor can directly execute after being translated into machine code. Pseudo-instructions, on the other hand, are commands for the assembler program itself. They tell the assembler how to process the source code, but they do not generate any executable machine code.

Analysing the Given Options

Let's examine each option provided in the question to determine whether it is a pseudo-instruction or a machine instruction.

  • ORG: This stands for Origin. It is a pseudo-instruction that tells the assembler to set the location counter to a specific value. This value determines the starting address in memory where the subsequent code or data will be placed. It is not an instruction for the CPU to execute.
  • DEC: This can have different meanings depending on the specific assembly language and context. However, in the context of assembler directives, it often refers to "Define Constant" (e.g., defining a decimal constant). If used in this way, it would be a pseudo-instruction telling the assembler to allocate space and store a specific value. (Note: 'DEC' can also be a mnemonic for a 'Decrement' machine instruction, but given the other options which are clearly directives or a halt instruction, 'Define Constant' or a similar directive role is likely intended here). Assuming it is a directive, it's a pseudo-instruction.
  • END: This is a pseudo-instruction that signifies the end of the source program to the assembler. Any text after the END directive is typically ignored by the assembler. It does not translate into any executable code.
  • HLT: This stands for Halt. This is a machine instruction that stops the execution of the processor. When the assembler encounters HLT, it translates it into the corresponding machine code that instructs the CPU to cease operations. This is an instruction for the CPU to execute, not just a directive for the assembler.

Comparing Pseudo-Instructions and Machine Instructions

Based on the analysis, ORG, DEC (in the context of a directive), and END are commands that help the assembler organize and process the code but do not become part of the executable program. HLT, however, is a direct command for the processor and is translated into machine code.

Instruction Types
Term Type Function
ORG Pseudo-instruction (Directive) Sets program origin/address counter.
DEC Pseudo-instruction (Directive, e.g., Define Constant) Defines data or allocates space.
END Pseudo-instruction (Directive) Marks the end of the source program.
HLT Machine Instruction Stops processor execution.

Therefore, HLT is the one option that is not an example of a pseudo-instruction; it is a machine instruction.

Conclusion on Pseudo-Instructions

The question asks which option is *not* a pseudo-instruction. From our analysis, ORG, DEC (as a directive), and END are typically considered pseudo-instructions. HLT is a machine instruction that causes the processor to halt execution. Thus, HLT is the correct answer as it is the only option that is not a pseudo-instruction.

Revision Table: Assembly Concepts

Key Assembly Terms
Term Definition Example
Assembly Language A low-level programming language that uses mnemonics to represent machine code instructions. MOV R1, #10
Assembler A program that translates assembly language code into machine code. Reads .asm file, outputs .obj or .hex file.
Machine Instruction A command that the CPU directly understands and executes, represented by a sequence of bits (machine code). ADD R1, R2, HLT
Pseudo-instruction (Directive) A command for the assembler, not the CPU, used to control the assembly process, allocate memory, define data, etc. ORG 100H, DB 25, END

Additional Information on Assembly Language and Directives

Assembly language provides a human-readable representation of machine code instructions. Programmers use mnemonics for operations and symbols for memory locations. The assembler handles the conversion to binary machine code. Pseudo-instructions are vital for writing assembly programs because they provide structure and control to the assembly process.

  • Data Definition Directives: Pseudo-instructions like DB (Define Byte), DW (Define Word), DD (Define Doubleword) are used to reserve memory locations and initialize them with specified data values.
  • Symbol Definition Directives: Pseudo-instructions like EQU (Equate) are used to assign a symbolic name to a constant value or an address.
  • Assembly Control Directives: Pseudo-instructions like ORG, END, ASSUME, SECTION/SEGMENT control how the assembler processes the program and manages memory segments.
  • Machine Instructions vs. Directives: It's crucial to distinguish between instructions that generate executable code (like MOV, ADD, JMP, HLT) and directives that guide the assembler (like ORG, END, DB, EQU). This distinction is fundamental to understanding how assembly language programs are translated and executed.
Was this answer helpful?

Important Questions from Instruction Format - Teaching

  1. The following program is stored in the memory unit of the basic computer. Give the content of accumulator register in hexadecimal after the execution of the program.

    Location

    Instruction

    010

    CLA

    011

    ADD 016

    012

    BUN 014

    013

    HLT

    014

    AND 017

    015

    BUN 013

    016

    C1A5

    017

    93C6

  2. A micro instruction format has micro operation field which is divided into 2 subfields F1 and F2, each having 15 distinct microoperations, condition field CD for four status bits, branch field BR having four options used in conjunction with address field AD. The address space is of 128 memory words. The size of micro instruction is:

  3. A computer uses a memory unit of 512 K words of 32 bits each. A binary instruction code is stored in one word of the memory. The instruction has four parts: an addressing mode field to specify one of the two-addressing mode (direct and indirect), an operation code, a register code part to specify one of the 256 registers and an address part. How many bits are there in addressing mode part, opcode part, register code part and the address part?

  4. A Computer uses a memory unit with 256K word of 32 bits each. A binary instruction code is stored in one word of memory. The instruction has four parts: an indirect bit, an operation code and a register code part to specify one of 64 registers and an address part. How many bits are there in operation code, the register code part and the address part?

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