Monday, 14 June 2021

coa viva question 1

 question:-What Are The Different Types Of Interrupts In A Microprocessor             System, Explain?

  1. Answer :

    In the normal execution of a program there are three types of interrupts that can cause a break:

    External Interrupts: These types of interrupts generally come from external input / output devices which are connected externally to the processor. They are generally independent and oblivious of any programming that is currently running on the processor.

    Internal Interrupts: They are also known as traps and their causes could be due to some illegal operation or the erroneous use of data. Instead of being triggered by an external event they are usually triggered due to any exception that has been caused by the program itself. Some of the causes of these types of interrupts can be due to attempting a division by zero or an invalid opcode etc.

    Software interrupts: These types if interrupts can occur only during the execution of an instruction. They can be used by a programmer to cause interrupts if need be. The primary purpose of such interrupts is to switch from user mode to supervisor mode.

  2. question:-What Is Virtual Memory In Computer?

    Answer :

    Virtual memory is that when the available RAM memory is not sufficient for the system to run the current applications it will take some memory from hard disk.This memory is termed as Virtual memory.

  3. question:-What is an instruction?

     An instruction is a binary pattern entered through an input device to command the microprocessor to perform that specific function.

     question:-How many operations are there in the instruction set of 8085 microprocessor?

     There are 74 operations in the 8085 microprocessor

     question:- List out the five categories of the 8085 instructions. Give e.g. of the instructions for each group?

     

    ü Data transfer group – MOV,MVI,LXI

     

    ü Arithmetic group – ADD,SUB,INR.

     

    ü Logical group- ANA,XRA,CMP.

    ü Branch group – JMP,JNZ,CALL.

     

    ü Stack I/O and machine control group – PUSH,POP,IN,HLT.

    question:-Explain the difference between a JMP instruction and CALL instru ction .

     A    JMP instruction permanently changes the program counter. A CALL instruction leaves information on the stack so that the original program execution sequence can be resumed

     question:-Explain the purpose of the I/O instructions IN and OUT

     ü The IN instruction is used to move data from an I/O port in to the accumulator.ü The OUT instruction is used to move data from the accumulator to an I/O port.

     ü The IN and OUT instructions are used only on microprocessor, which u s e a separate address space for interfacing.

    question:-What is the difference between the shift and rotate instructions?

     A  rotate instruction is a closed loop instruction .that is the data moved out at one end is put back in at the other end. The shift instruction loses the data that is moved out of the last bit locations.

     question:- List the four instructions which control the interrupt structure of the 8085 microprocessor?

     ü DI(disable interrupts)

    ü EI(enable interrupts)

     ü RIM(read interrupt masks)

    ü SIM(set interrupt masks)

    question:- Mention the categories of instruction and give two ex for each category?

     The instructions of 8085 can be categorized in to the following five

     1.     Data transfer MOV RD,RS,STA 16-BIT

     2.     Arithmetic ADD R,DCR M.

     3.     Logical XRI 8- bit,RAR

     4.     Branching JNZ CALL 16-bit

     5.     Machine control HLT,NOP

    question:-Explain LDA, STA AND DAA instructions

     LDA copies the data byte in to the accumulator from the memory location specified by the 16-bit address. STA copies the data byte from the accumulator in the memory location specified by 16-bit address. DAA changes the content of the accumulator from binary to 4-bit BCD digits

    question:-Explain the different instruction formats with ex?

     The instruction set is grouped in to the following formats One byte instruction MOV C,A Two byte instruction MVI A,39H Three byte instruction JMP 2345H

    question:- What is the use of addressing modes, mention the different types?

     The v a r i o u s formats of specifying the operands are called as addressing modes, it is used to access the operands or data. The different types are as follows

     1.     Immediate addressing

     2.     Register addressing

     3.     Direct addressing

     4.     Indirect addressing

     5.     Implicit addressing

     question:-Define stack and stack related instructions?

     The stack is a group of memory locations in the R/W memory that is used for the temporary storage of binary information during the execution of the program. The stack related instructions are PUSH and POP

    question:- Why do we use XRA A instruction?

     The XRA A instruction is used to clear the contents of the accumulator and store the value 00H

    question:- Compare CALL and PUSH instructions

     CALL

     When CALL is executed the microprocessor automatically stores the 16-bit address of the instruction next to CALL on the stack

     When CALL is executed the stack pointer is decremented by two

     PUSH

     The program uses the instruction PUSH to save the contents of the register pair on the stack

     When PUSH is executed the stack pointer register is decremented by two

    question:-How does the microprocessor differentiate b/w data and instruction?

     When the first m/c code of an instruction is fetched and decoded in the instruction register, the  microprocessor recognizes the number of by t e s required to fetch the entire instruction. For ex MVI A,data, the second byte is always considered as data. If the data byte is omitted by mistake whatever is in that memory location will be considered as data and the byte after the “data “will be treated as the next instruction.

     question:- Compare RET and POP

     RET

     RET transfers the content of the top two locations of the stack to the PC

     When RET is executed the SP is incremented by two. And it has 8 conditional RETURN instructions

    POP

     Pop transfers the content of the top two locations of the stack to the specified register pair

     When POP is executed the SP is incremented by two and no conditional POP instructions

     question:-What are subroutine?

    Procedures are group of instructions stored as a separate program in memory and it is called from the main program in memory and it is called from the main program whenever required. The type of procedure depends on where the procedures are stored in memory. If it is in the same code segment as that of the main program then it is a near procedure otherwise it is a far procedure.

     question:- What is a recursive procedures?

     A recursive procedure is a procedure, which calls itself. Recursive procedures are used to work with complex data structures called trees. If the procedure is called with N=3, then the N i s decremented by 1 after each procedure CALL and the procedure is called until N=0.

     question:-   How to access subroutine with in the main program procedure?

     ü accessed by CALL & RET instruction

     ü machine code of instruction is put only once in the memory iii)with procedures less memory is required

     ü parameters can be passed in registers, memory location or stack

     question:-Define stack?

     Stack is a sequence of RAM memory locations defined by the programmer.

     question:- How the microprocessor is synchronized with peripherals?

     The timing and control unit synchronizes all the microprocessor operations with clock and generates control signals necessary for communication between the microprocessor and peripherals.

     question:-. What is the minimum s/m and how it is formed in 8085?

     A minimum s/m is one which is formed using minimum number of IC chips. The 8085 based minimum s/m is formed using 8155, 8355 & 8755.

  4. .

4 comments:

My Feelings for death

 Kyu hoti hai kisi ki death, I don't know but why. M aaj tak nhi samjh pae ki ensan ki death kyu hoti hai. Kisi se bhi pucho to ye jawab...