Microprocessor
Question Bank
                               (For the students of CSE 4th Sem)
[1] Which instructions are used for peripheral I/O and memory mapped I/O techniques.
[2]  Explain why the number of output ports in the peripheral-mapped I/O is restricted to 256 parts.
[3] Specify the control signals necessary in the peripheral mapped I/O technique.
[4] How many machine cycles are used to execute OUT instruction? Explain briefly.
[5] Write the instructions to display 7 using seven segment display device with device address F5H. The
    common anode seven segments LED works on logic 0 to turn on. Also explain the logic for address
    lines A7-A0 with address F5H.
[6] Specify the output of the PORT # if the following program is executed and specify the contents of the
    register before and after execution. Explain the program using flowchart.
                          MVI B, 02H
                              MOV A, B
                              MOV C, A
                              MVI D, 17H
                              OUT PORT #
                              HLT
[7] Write an instruction to load 00H in the accumulator, then decrement the accumulator and display the
     answer on the output port 01H.
[8] Write a program to                a) clear the accumulator
                                          b) Add 48H
                                         c) Subtract 93H
                                         d) Add 68 H
                                         e) Display the result after subtracting 93H and after adding 68H
[9] Write the instruction to load the number 2050H in the register pair HL. Increment the number using the
     instruction INX H and illustrate whether INR H instruction is equivalent to the instruction INR L.
[10] The memory location C050H holds the data byte F8H. Write the instructions to transfer the data byte to
     the accumulator using three different opcodes: MOV, LDAX and LDA.
[11] Assume the accumulator contents are 0AH and CY=1. Illustrate the accumulator contents after the
     execution of the instruction RAL twice.
[12] Following set of instructions are executed in microprocessor 8085 to set up a delay using register.
       T-States
                MVI C, FFH                                7
      LOOP DCR C                                                   4
               JNZ LOOP                                            10/7
    Calculate total delay of all instructions using 2 MHz clock frequency of the system.
[13] Write a program to count from 0 to 9 using delay between each count using HL register pair. At the
       count of 9, the counter should reset itself to 0 and repeat the sequence continuously. Display each
       count at one of the output ports.
[14] What is the need to use a subroutine in a program?
[15] Which command is used to load a stack pointer?
[16] Write the operands for the opcodes PUSH, PULL, CALL, RET using various examples.
[17] Explain the functions of the following routines:
                       a) LXI SP, 209FH                                    b) LXI SP, STACK
                         MVI C, 00H                                   PUSH B
                         PUSH B                                                PUSH D
                         POP PSW                                               POP B
                         RET                                           POP D
[18] What do you mean by maskable and non maskable interrupts? Differentiate between RIM and SIM.
[19] Assuming the microprocessor is completing an RST 7.5 interrupt request, check to see if RST 6.5 is
     pending. If it is pending, enable RST 6.5 without affecting any other interrupts; otherwise, return to the
     main program.
[20] What are the two different techniques used for interfacing I/O devices using microprocessor 8085?
       Differentiate between them and also write the instructions used to execute them.
[21] Assume the accumulator contents are 61H and CY=1. Illustrate the accumulator contents after the
        execution of the instruction RRC and RAR.
[22] Write a program to count continuously in hexadecimal from FFH to 00H in a system with a delay register
        C with the count 8CH and display the number on one of the output ports.
[23] Draw the flowchart for hexadecimal counter to count from FFH to 00H.
[24] What is the need for STACK register?
[25] Read the following program and answer the questions:
     2000 LXI SP,2100H                    DELAY: 2064 PUSH H
     2003 LXI B,0000H                                    2065 PUSH B
     2006 PUSH B                                         2066 LXI B, 80FFH
     2007 POP PSW                               LOOP: 2069 DCX B
     2008 LXI H,200BH                                    206A MOV A,B
     200B CALL 2064H                                     206B ORA C
     200 E OUT 01 H                                      206 C JNZ LOOP
     2010 HLT                                            206F POP B
                                                         2070     RET
(i) What is the status of the flags after the execution of POP PSW instruction? Specify the stack locations
          and their contents after the execution CALL instruction (not the call subroutine).
(ii) What are the contents of the stack pointer and program counter after the execution of CALL instruction?
(iii) Specify the memory location where the program returns after the subroutine.
[26] Which instructions are used to enable and disable the interrupt? Describe the steps 8085 uses when
        any interrupt occurs.
[27] Write a program to generate a continuous wave with the period of 500 micro sec. Assume the system
        clock period is 325 ns and use bit D0 to output the square wave.
[28] List all the conditional call and conditional return instructions.
[29] What do you mean by nesting?
[30] Can an input port and output port have the same port address?
[31] If high order lines are partially decoded, how can one determine whether it is peripheral I/O or memory
        mapped I/O?
[32] Differentiate between (1) POP and PUSH (2) CALL and Return.
[33] Write a program to add two hex numbers 7A and 46 and to store the sum at memory location XX98H
        and the flag status at location XX97H.
[34] Following set of instructions are executed in microprocessor 8085 to set up a delay using register.
        T-States
                 LXI B,FFH                                          10
     LOOP: DCX B                                            6
                  MOV A, C                                          4
                  ORA B
                 JNZ LOOP                                           10/7
         Calculate total delay of all instructions using 2 MHz clock frequency of the system.
[35] Microprocessor 8085 executes the following program.
                INSTRUCTION                  BYTES                  T-States
   START: LDA FFF9H                                 3                       13(4,3,3,3)
                 STA FFF8H                   3                      13(4,3,3,3)
                  MOV B, A                          1                       4
                  JMP START                  3                      10(4,3,3)
   For the given program (i) Identify the machine cycles of each instruction.
                                (ii) Specify the contents of address bus in the fourth machine cycle of the LDA
                                instruction.
                                   (iii)If the system frequency is 2MHz, calculate the time period between two
                    consecutive             signals.