GATE Exercises on Microprocessors

Similar documents
MSMF GATE CENTRE. Sub: MICROPROCESSORS. Time: 50min Date: Marks:33

ELECTRICAL ENGINEERING


Subject Code: Model Answer Page No: /25

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

(2) Explain the addressing mode of OR What do you mean by addressing mode? Explain diff. addressing mode for 8085 with examples.

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

INSTRUCTION SET OF 8085

8085 INSTRUCTION SET INSTRUCTION DETAILS

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

Assembly Language Programming of 8085

Its Assembly language programming

LIST OF PROGRAMS. Prg. Name of the Program. 1 Study of Pin Diagram of Study of Architecture of Study of 8085 Kit.

SAMPLE STUDY MATERIAL

INSTITUTE OF ENGINEERING AND MANAGEMENT, KOLKATA Microprocessor

Assembly Language Programming of 8085

Practical Course File For

م.م. ماجد عيدان. Introduction to microprocessor and microcomputer

The due date for submitting this assignment has passed. 1) How many times will the following loop be executed? Depends on the initial value of A

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

UNIT I. Differences between: Microcomputer, Microprocessor and Microcontroller

UNIT 1 REFERENCE 1 PREPARED BY S.RAVINDRAKUMAR, LECT/ECE, CHETTINAD COLLEGE OF ENGG AND TECH, KARUR

Introduction to Assembly Language Programming (Instruction Set) 1/18/2011 1

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT I THE 8085 & 8086 MICROPROCESSORS. PART A (2 Marks)

COPYRIGHT IS NOT RESERVED BY AUTHORS. AUTHORS ARE NOT RESPONSIBLE FOR ANY LEGAL ISSUES ARISING OUT OF ANY COPYRIGHT DEMANDS

S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Unit 1 8 BIT MICROPROCESSOR ARCHITECTURE

EE309: Computer Organization, Architecture and MicroProcessors. sumantra/courses/up/up.html GND HIGH ORDER ADDRESS BUS

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

1. What is Microprocessor? Give the power supply & clock frequency of 8085?

Pin Description, Status & Control Signals of 8085 Microprocessor

Microprocessor Micro Syllabus BSc. CSIT, IOST, TU. Microprocessor

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

EKT222 Miroprocessor Systems Lab 5

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 153) Pass Marks: 24

ROEVER ENGINEERING COLLEGE

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) MODEL ANSWER

EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

G. Pullaiah College of Engineering and Technology: Kurnool Department Of Electronics and Communication Engineering

Lecture Note On Microprocessor and Microcontroller Theory and Applications

Microprocessor Architecture

8085 Microprocessor Architecture and Memory Interfacing. Microprocessor and Microcontroller Interfacing

MICROPROCESSOR BASICS AND RELATED TERMS

AE66/AC66/AT66/ AE108/AC108/AT108 MICROPROCESSORS & MICROCONTROLLERS

Assembly language Programming

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY

1. Internal Architecture of 8085 Microprocessor

INDEX. 1 Study of intel 8085 micropeocessor kit. 2 Program to find addition of two 8 bit no. 3 Program to find subtraction of two 8 bit no.

SIR.C.R.R.COLLEGE OF ENGINEERING DEPT. OF ELECTRONICS AND INSTRUMENTATION ENGG. EIE-328: MICROPROCESSOR LABORATORY 3/4 B.E. EIE: SECOND SEMESTER

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

1. Internal Architecture of 8085 Microprocessor

MICROPROCESSOR MICROPROCESSOR. From the above description, we can draw the following block diagram to represent a microprocessor based system: Output

EXAMPLE PROGRAMS 8085

XII HSC - BOARD - MARCH

Q. P. Code : b. Draw and explain the block dig of a computer with microprocessor as CPU.

CS2259-MICROPROCESSOR AND MICROCONTROLLER LABORATORY MANUAL

DE60/DC68 MICROPROCESSORS & MICROCONTROLLERS JUN 2015

DE60/DC68 MICROPROCESSORS & MICROCONTROLLERS JUNE 2013

Vidyalankar T.E. Sem. V [EXTC] Microprocessors and Microcontrollers I Prelim Question Paper Solution V SS (GND)

LABORATORY MANUAL. PROGRAMME: B.Tech SEMESTER /YEAR: 3rd year 5th Semester SUBJECT CODE: CS592 SUBJECT NAME: Microprocessor & Microcontroller Lab

Sunday, April 25, 2010

(2½ Hours) [Total Marks: 75]

The 8085 Instruction Set

SIR C.R.REDDY COLLEGE OF ENGINEERING ELURU DIGITAL ELECTRONICS & MICROPROCESSOR LAB MANUAL 2/4 CSE: II- SEMESTER

MICROPROCESSOR AND MICROCONTROLLER

Programming of 8085 microprocessor and 8051 micro controller Study material

Micro Processor & Micro Controllers

1. Internal Architecture of 8085 Microprocessor

QUESTION BANK. EE 6502 / Microprocessor and Microcontroller. Unit I Processor. PART-A (2-Marks)

8085 Microprocessor Programs


Computer Organization

The advantages of registers over memory locations are as follows:

Microprocessor and Microcontroller question bank. 1 Distinguish between microprocessor and microcontroller.

Syllabus for Bachelor of Technology. Computer Engineering. Subject Code: 01CE0501. Subject Name: Microprocessor Fundamentals & Programming

History and Basic Processor Architecture

EXPERIMENT-1 AIM: Familiarization of different keys of 8085 microprocessor kit and its memory map. APPARATUS: 8085 kit. DIAGRAM:

MACHINE CONTROL INSTRUCTIONS: 1. EI

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

Vidyalankar T.E. Sem. V [ETRX] Microprocessors and Microcontrollers I Prelim Question Paper Solution

9/25/ Software & Hardware Architecture

1 = Enable SOD 0 = Disable SOD. Serial Output Data. Fig.12.9 SIM Instruction Format

Instruction : A command to the microprocessor to perform a given task on specified data. Each instruction has two parts

1. What is microprocessor? It is a program controlled semi conductor device (IC), which fetches, decodes and execute instructions.

E3940 Microprocessor Systems Laboratory. Introduction to the Z80

PERIPHERAL INTERFACING Rev. 1.0

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 4 The 8051 Architecture

Architecture of 8085 microprocessor

LABORATORY 1 INTRODUCTION TO 8085 MICROPROCESSOR DEVELOPMENT SYSTEM BOARD

QUESTION BANK CS2252 MICROPROCESSOR AND MICROCONTROLLERS

Microcomputer Architecture and Programming

1-Operand instruction types 1 INC/ DEC/ NOT/NEG R/M. 2 PUSH/ POP R16/M16/SR/F 2 x ( ) = 74 opcodes 3 MUL/ IMUL/ DIV/ DIV R/M

Types of Interrupts:

Instruction set of 8085

Department of Computer Science and Engineering

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING YEAR : III SEM : VI

Transcription:

1 GATE Exercises on Microprocessors Abstract This problem set has questions taken from GATE papers over the last twenty years. Teachers can use the problem set for courses tutorials. 1) The clock frequency of an 8085 microprocessor is 5 MHz.If time required to execute an instruction is 1.4µs,then number of T states needed for executing the instruction is MVI A,33H MVI B,78H ADD B CMA ANI 32H The Accumulator value immediately after the execution of the fifth instruction is a) 1 b) 6 c) 7 d) 8 2) In an 8085 system, a PUSH operation requires more clock cycles than a POP operation. Which one of the following options is the correct reason for this? a) For POP, the data transceivers remain in the same direction as for instruction fetch (memory to processor), whereas for PUSH their direction has to be reversed. b) Memory write operations are slower than memory read operations in an 8085 based system. c) The stack pointer needs to be predecremented before writing registers in a PUSH, whereas a POP operation uses the address already in the stack pointer. d) Order of registers has to be interchanged for a PUSH operation, whereas POP uses their natural order. 3) In an 8085 microprocessor, the shift registers which store the result of an addition and the overflow bit are, respectively a) B and F b) A and F c) H and F d) A and C 4) In an 8085 microprocessor, the shift registers which store the result of an addition and the overflow bit are, respectively a) MOV B,M b) PCHL c) RNZ d) SBI BEH 5) For 8085 microprocessor, following code executed MVI A,05H MVI B,05H PTR:ADD B DCR B JNZ PTR ADI 03H HLT At the end of program,accumulator contains a) 17H b) 20H c) 23H d) 05H 6) An 8085 assembly language program is given below. Assume that the carry flag is initially unset.the content of the accumulator after the execution of the program is MVI A,07H RLC MOV B,A RLC RLC ADD B a) 8CH b) 64H c) 23H d) 15H 7) In an microprocessor, the service routine for a certain interrupt starts from a fixed location

2 of memory which cannot be externally set,but the interrupt can be delayed or rejected.such interrupt is a) non-maskable and non-vectored b) maskable and non-vectored c) non-maskable and vectored d) maskable and vectored 8) The number of memory cycles required to execute the following 8085 instructions. I. LDA 3000H II. LXI D, FOF 1H would be a) 2 for I and 2 for II b) 4 for I and 3 for II c) 3 for I and 3 for II d) 3 for I and 4 for II 9) The 8255 Programmable Peripheral Interface is used as described below. I. An A/D converter is interfaced to a microprocessor through an 8255. the conversion is initiated by a signal from the 8255 on Port C. A signal on Port C causes data to be strobed into Port A. II. Two computers exchange data using a pair of 8255s. Port A works as a bidirectional data port supported by appropriate handshaking signals. would be The appropriate modes of operation of the 8255 for I and II would be a) Mode 0 for I and Mode 1 for II b) Mode 1 for I and Mode 0 for II c) Mode 2 for I and Mode 0 for II d) Mode 2 for I and Mode 1 for II 10) Consider the sequence of 8085 instructions given below. LXI H, 9258 MOV A, M CMA MOV M, A Which one of the following is performed by this sequence? a) contents of location 9258 are moved to the accumulator b) contents of location 9258 are compared with the contents of the accumulator c) contents of location 8529 are complemented and stored in location 8529 d) contents of location 5892 are complemented and stored in location 5892 11) In an 8085 microprocessor, the instruction CMP B has been executed while the content of the accumulator is less than that of register B. As a result? a) Carry flag will be set but Zero flag will be reset b) Carry flag will be reset but Zero flag will be set c) Both Carry flag and Zero flag will be reset d) Both Carry flag and Zero flag will be set 12) The number of hardware interrupts (which require an external signal to interrupt) present in an 8085 microprocessor are a) 1 b) 5 c) 4 d) 13 13) In the 8085 microprocessor, the RST6 instruction transfers the program execution to the following location a) 30 H b) 24 H c) 48 H d) 60 H 14) An 8085 executes the following instructions. 2710 LXI H, 30A0H 2713 DAD H 2714 PCHL All addresses and constants are in Hex. Let PC be the contents of the program counter and HL be the contents of the HL register pair just after executing PCHL. Which of the following statements is correct? a) PC=2715H HL=30A0H b) PC=30A0H HL=2715H c) PC=6140H HL=6140H d) PC=6140H HL=2715H 15) For a microprocessor system using I/O mapped I/O the following statement(s) is NOT true a) Memory space available is greater. b) Not all data transfer instruction are available. c) I/O and Memory address spaces are distinct. d) I/O address space is greater. 16) In an 8085 microprocessor system,the RST

3 instruction will cause an interrupt a) Only if an interrupt service routine is not being executed. b) Only if a bit in the interrupt mask is made 0. c) Only if interrupts have been enabled by an EI instruction. d) None of the above. 17) A snapshot of the address, data and control buses of an 8085 microprocessor executing program is given below: Address Data M RD WR 2020H 24H Logichigh Logichigh LogicLow The assembly language instruction being executed is a) IN 24H b) OUT 24H c) IN 20H d) OUT 20H 18) An 8Kx8 bit RAM is interfaced to an 8085 microprocessor. In a fully decoded scheme, if the address of the last memory location of this RAM is 4FFFH, the address of the first memory location of the RAM will be a) 1000H b) 2000H c) 3000H d) 4000H 19) The following is an assembly language program for 8085 microprocessors Address Instructioncode Mnemonic 1000H 3E06 MV IA, 06H 1002H C670 ADI70H 1004H 320710 S T A1007H 1007H AF XRAA 1008H 76 HLT When this program halts, the accumulator contains a) 00H b) 06H c) 70H d) 76H 20) A part of a program written for an 8085 microprocessor is shown below. When the program execution reaches LOOP2, the value of register C will be SUB A MOV C, A LOOP1: INR A DAA JC LOOP2 JNC LOOP1 LOOP2: NOP a) 63H b) 64H c) 99H d) 100H 21) A 2k 8 bit RAM is interfaced to an 8- bit microprocessor. If the address of the first memory location in the RAM is 0800H, the address of the last memory location will be a) 1000H b) 0FFFH c) 4800H d) 47FFH 22) Find the correct match among the following pair in the context of an 8085 microprocessor : (a)daa (b)lxi (c)rs T (d)jmp (e)programcontrolinstruction ( f )DatamovementInstruction (g)interruptinstruction (h)arithmeticinstruction a) a-e, b-f, c-g, d-h b) a-h, b-g, c-f, d-e c) a-h, b-f, c-g, d-e d) a-f, b-h, c-g, d-e 23) The subroutine SBX given below is executed by an 8085 processor. The value in the accumulator immediately after the execution of the subroutine will be: SBX : MVI A,99H ADI 11H MOV C,A RET a) 00H b) 11H c) 99H d) AAH 24) In an 8085 processor, the main program calls the subroutine SUB1 given below. When the

4 program returns to the main program after executing SUB1, the value in the accumulator is Address OpcodeMnemonics 2000 3E00 2002 CD0520 2005 3C 2006 C9 SUB1:MVI A,00H CALL SUB2 SUB2: INR RET a) 00 b) 01 c) 03 d) 04 25) Consider a system consisting of a microprocessor, memory, and peripheral devices connected by a common bus. During DMA data transfer, the microprocessor a) only read from the bus. b) only write to the bus. c) both read from and writes to the bus. d) neither read from nor writes to the bus. 26) The following is an assembly language program for 8085 microprocessors: Address Instructioncode Mnemonic 1000H 3E06 MV IA, 06H 1002H C670 ADI70II 1004H 320710 S T A1007H 1007H AF XRA 1008H 76 HLT When this program halts, the accumulator contains a) 00H b) 70H c) 06H d) 76H 27) A memory mapped I/O device has an address of 00F0H. Which of the following 8085 instructions outputs the content of the accumulat or to the I/O device? a) LXI H, 00F0H, MOV M, A b) LXI H, 00F0H, OUT F0H c) LXI H, 00F0H, OUT M d) LXI H, 00F0H, MOV A, M 28) An 8085 assembly language program is given as follows. The execution time of each instruction is given against the instruction in terms of T-state. Instruction MVIB, 0AH LOOP : MVIC, 05H DCRC DCRB JNZLOOP T states 7T 7T 4T 4T 10T/7T The execution time of the program in terms of T - states is a) 247 T b) 254 T c) 250 T d) 257 T 29) The time period of a square wave in the audio frequency range is measured using an 8085 microprocessor by feeding the square wave to one of the four interrupts, namely, RST 7.5, RST 6.5, RST 5.5, or INT. The algorithm used starts a timer at the beginning of a time period, stops the timer at the beginning of the next time period and reads the timer values for time measurement. Which of the following interrupts should be selected for this application? a) INTR b) RST 6.5 c) RST 5.5 d) RST 7.5 30) In an 8085 microprocessor, which one of the following is the correct sequence of the machine cycles for the execution of the DCR M instruction? a) op-code fetch. b) op-code fetch, memory read, memory write. c) op-code fetch memory read. d) op-code fetch memory write, memory write. 31) In an 8085 microprocessor the value of the stack pointer (SP) is 2010H and that of DE register pair is 1234H before the following code is executed. The value of the DE register pair after the following code is executed is

5 LXI H, 0000H PUSH H PUSH H POP B DAD SP XCHG a) 200E H b) 2010 H c) 200C H d) 1232 H 32) The vectored address corresponding to the software interrupt command RST7 in 8085 microprocessor is a) 0017H b) 0038H c) 0700H d) 0027H 33) The following 8085 instructions are executed sequentially. PROG: XRA A MOV L, A MOV H, L INX H DAD H After execution, the content of HL register pair is a) 0000H b) 0001H c) 0002H d) 0101H 34) In an 8085 system containing 8KB of ROM and 8KB of RAM, the ROM is selected when A 15 is 0 and the RAM is selected when A15 is 1. A13 and A14 are unused. The CPU executes the following program MV1 A,00H STA 8080H DCR A STA C080H RET The content of memory location 8080 H after the execution of the RETURN instruction is a) FFH b) FEH c) 00H d) 01H 35) In an INTEL 8085 microprocessor the ADDRESS-DATA bus and the DATA bus are a) Non multiplexed b) Duplicated c) Multiplexed d) Same as CONTROL bus 36) A minimal microcomputer system is constructed using INTEL 8085 microprocessor, an 8156 RAM and an 8355 ROM. The chip enable CE of 8156 and chip enable CE of 8355 are connected to the address line. A12 of 8085. The address of port A of the 8156 chip is a) 21H b) 11H c) 12H d) 20H 37) In a microprocessor with 16 address and 12 data lines, the maximum number of opcodes is a) 2 6 b) 2 12 c) 2 8 d) 2 16 38) An m-bit microprocessor has an m-bit a) flag register b) data counter c) instruction register d) program counter 39) In 8085 microprocessor, CY flag may be set by the instruction a) SUB b) CMA c) INX d) ANA 40) Microprocessor 8085 regains control of the bus a) immediately after HOLD goes low. b) immediately after HOLD goes high. c) after half-clock cycle after HLDA goes low. d) after half-clock cycle after HLDA goes high. 41) If the following program is executed in a microprocessor, the number of instruction

6 cycles it will take from START TO HALT is START MV1A, 14 H SHIFT RLC JNZ SHIFT HALT a) 4 b) 8 c) 13 d) 16 42) Which one of the following is not a vectored interrupt? a) TRAP b) RST7.5 c) INTR d) RST3 43) The following program is written for an 8085 microprocessor to add two bytes located at memory addresses 1FFE and 1FFF LXI H, 1FFE MOV B, M INR L MOV A, M ADD B INR L MOV M, A XOR A On completion of the execution of the program, the result of addition is found a) in the register A b) at the memory address 1000 c) at the memory address 1F00 d) at the memory address 2000 44) In an 8085 microprocessor,the following program executed Address 2000H 2001H 2003H 2005H 2006H 2007H 200AH Instructioncode XRAA MV IB, 04H MV IA, 03H RAR DCRB JNZ2005 HLT At the end of program,register A contains a) 60H b) 30H c) 06H d) 03H 45) In an 8085 microprocessor, the contents of the Accumulator, after the following instructions are executed will become XRA A MVIB F0H SUB B a) 01H b) F0H c) 10H d) 0FH 46) An input device is interfaced with Intel 8085A microprocessor as memory mapped I/O. The address of the device is 2500H. In order to input data from the device to accumulator, the sequence of instructions will be a) LXI H, 2500H ;MOV A, M b) LHLD 2500H;MOV A, M c) LXI H, 2500H ;MOV M, A d) LHLD 2500H;MOV M, A 47) The contents (in Hexadecimal) of some of the memory locations in an 8085A based system are given below Address Contents...... 26FE 00 26FF 01 2700 02 2701 03 2702 04...... The contents of stack pointer (SP), Program counter(pc) and (H, L) are 2700H, 2100H and 0000H respectively. When the following sequence of instructions are executed, 2100 H: DAD SP 2101 H: PCHL the contents of (SP) and (PC) at the end of execution will be

7 a) (PC)=2102H, (SP)=2700H b) (PC)=2800H, (SP)=26 FE H c) (PC)=2700H, (SP)=2700H d) (PC) = 2A02H, (SP)= 2702H 48) Which one of the following statements regarding the INT (interrupt) and the BRQ (but request) pins in a CPU is true? a) The BRQ pin is sampled after every instruction cycle, but the INT is sampled after every machine cycle. b) Both INT and BRQ are sampled after every machine cycle. c) The INT pin is sampled after every instruction cycle, but the BRQ is sampled after every machine cycle. d) Both INT and BRQ are sampled after every instruction cycle. 49) If the operating frequency of 8086 microprocessor is 10MHz and,if for the given instruction,the machine cycle consist of 4 T states,what will be the time taken by the machine cycle to complete execution of same instruction when three waits states are inserted? b) Implied addressing mode. c) Register addressing mode. d) Direct addressing mode. 52) In microprocessor, WAIT states are used to a) Make the processor WAIT during a DMA operation. b) Make the processor WAIT during an Interrupt operation. c) Make the processor WAIT during a Power shut Down. d) Direct addressing mode. a) 0.4µs b) 0.7µs c) 70µs d) 7µs 50) consider the following loop MOV CX, 8000H L1:DEC CX JNX L1 The processor is running at 14.7456/3 MHz and DEC CX require two clock cycles and JNZ requires 16 clock cycles.the total time taken is nearly a) 0.01µs b) 0.12µs c) 3.66µs d) 4.19µs 51) An Addressing mode in which the location of the data is obtained within the mnemonics,is known as a) Immediately addressing mode.