Write and explain the sequence of micro-operations that are required to fetch and execute this instruction? – IGNOU MCA Assignment 2014 – 15

By | October 11, 2014

MASTER OF COMPUTER APPLICATIONS
Course Code : MCS-012
Course Title : Computer Organisation and Assembly Language Programming
Assignment Number : MCA (2)/012/Assign /2014-15
Maximum Marks : 100
Weightage : 25%

A hypothetical 16 bit machine has PC, AC, MAR, IR, DR and Flag registers (You may assume the roles of these registers same as that are defined in general for a von Neumann machine). The instructions of this machine contain only one operand address which is a memory operand. On execution, the memory operand is first brought into the DR register. The second operand, if required, can be stored in AC register and the result of the operation is also stored in the AC register, if needed. The machine has the following instruction

STORE memAddress    // this instruction result in storage of the content of AC register into the memory location specified by memAddress.

Write and explain the sequence of micro-operations that are required to fetch and execute this instruction Make and state suitable assumptions, if any.

The instruction execution using the micro-operations requires:

  • Instruction fetch: fetching the instruction from the memory.
  • Instruction decode: decode the instruction.
  • Operand address calculation: find out the effective address of the operands.
  • Execution: execute the instruction.
  • Interrupt Acknowledge: perform an interrupt acknowledge cycle if an interrupt request is pending.Seq_Micro_Operations_01

     

    Instruction fetch:

    Transfer the address of PC to MAR. (Register Transfer) MAR ß PC
    MAR puts its contents on the address bus for main and issues a memory read signal. The word so read is placed on the data bus where it is accepted by the Data register.The PC is incremented by one memory word length to point to the next instruction in sequence. DR ß (MAR), 

     

    PCß PC +1

    The instruction is transferred from data register to the Instruction register processing. IR ß DR

     

    Instruction Decode: The Control Unit determines the operation that is to be performed and the addressing mode of the data.

     

    Operand Address Calculation: (In case of direct addressing)

    Transfer the address portion of instruction is the direct address so no further calculation needed. IR (Address) and DR (Address) contain the Effective address.

     

    Operand Address Calculation: (In case of indirect addressing)

    Transfer the address bits of instruction to the MAR. This transfer can be achieved using DR, as DR and IR at this point of time contain the same value. (Register Transfer) MAR ß DR (Address)
    Perform a memory read operation as done in fetch cycle and the desired address of the operand is obtained in the DR. (Memory Read) DR ß (MAR)
    Transfer the address part so obtained in DR as the address part of instruction. (Register Transfer) Thus, the indirect address is now converted to direct address or effective address. IR (Address) ß DR (Address)

     

    Execution:

    Transfer the address portion of the instruction to the MAR. (MemAddress transfer) MAR ß MemAddress
    Store the AC register to Memory Address in MAR.   (MAR) ß AC

     

    Interrupt Processing:

    Transfer the contents of PC to DR DR ß PC
    Place the address of location, where the return address is to be saved, into MAR. MAR ß Address of location for saving return address.
    Store the contents of PC in the memory using DR and MAR. (Memory write) Transfer the address of the first instruction of interrupt servicing routine to the PC. (MAR) ßDRPC ß address of the first instruction interrupt service programs