Microprocessors and Microcontrollers: Unit II: (a) 8085 Instruction Set and ALP

Two Marks Questions with Answers

Microprocessors and Microcontrollers | 8085 Instruction Set and ALP

Microprocessors and Microcontrollers: Unit II: (a) 8085 Instruction Set and ALP : Two Marks Questions with Answers

Two Marks Questions with Answers

 

Q. l What is an operand ?

Ans. : The data on which the operation is to be performed is called an operand.

 

Q.2 How many operations are there in the instruction set of 8085 microprocessor ?

Ans. : There are 74 operations in the 8085 microprocessor.

 

Q. 3 What is an opcode ?

Ans. : The part of the instruction that specifies the operation to be performed is called the operation code or opcode.

 

Q.4 List out the five categories of the 8085 instructions. Give examples of the instructions for each group.

Ans. :

• 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, HLT.

 

Q.5 Explain the purpose of the I/O instructions IN and OUT.

Ans. : The IN instruction is used to move data from an I/O port into 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 use a separate address space for I/O interfacing.

 

Q.6 What is the difference between the shift and rotate instructions ?

Ans. : 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.

 

Q.7 What are operations performed on data in 8085 ?

Ans. : The various operations performed are :

• Store 8-bit data

• Perforin arithmetic and logical operations

• Test for conditions

• Sequence the execution of instructions

• Store data temporarily during execution in the defined R/W memory locations called the stack

 

Q.8 What is an instruction ?

Ans. : An instruction is a binary pattern or code which is interpreted by the microprocessor to perform that specific function.

 

Q.9 Explain the different instruction formats with examples.

Ans. : The instruction set is grouped into the following formats.

• One byte instruction -MOV C, A

• Two byte instruction -MVI A, 39H

• Three byte instruction -JMP 2345H

 

Q.10 What is the use of addressing modes, mention the different types.

Ans. : The various formats of specifying the operands are called addressing modes, it is used to access the operands or data. The different types are as follows :

• Immediate addressing

• Register addressing

• Direct addressing

• Indirect addressing

• Implicit addressing

 

Q.11 What is the type of stack used in 8085 ?

Ans. : Memory type stack is used in 8085

 

Q.12 What are the different addressing modes of 8085 ?

Ans. : The 8085 has 5 addressing modes. These are :

1. Immediate 2. Register          3. Direct  4. Indirect 5. Implied

 

Q.13 Define addressing modes.

Ans. : The different ways that a microprocessor can access data are referred to as addressing modes.

 

Q.14 What is the significance of 'XCHG' and 'SPHL' instructions ?

Ans. : XCHG : This instruction exchanges the contents of the register H with that of D and of L with that of E.

SPHL : This instruction copies the contents of HL register pair into the stack pointer. The contents of H register are copied to higher order byte of stack pointer and contents of L register are copied to the lower byte of stack pointer. This allows indirect way of initializing stack pointer.

 

Q.15 Differentiate cascade stack and memory stack.

Ans. : In a cascaded stack, CPU registers are used as a stack. In memory stack, the part of memory is used for stack.

 

Q.16 What is the function of SIM instruction in 8085 ?

Ans. : The SIM instruction masks the interrupts as desired. It also sends out serial data through the SOD pin.

 

Q.17 Write the operation carried out when 8085 executes RSTO instruction.

Ans. : When 8085 executes RSTO instruction, the program control is transferred to memory address 0000H. Before transfer of program control RSTO instruction saves the current program counter contents on the stack and decrements stack pointer by 2.

 

Q.18 Write the difference between opcode and operand.    

AU : May-08 1

Ans. : Opcode indicates the operation to be performed and operand is a data on which the operation is performed.

 

Q.19 Write the stack related instructions in 8085 microprocessor.        

AU : May-08

Ans. : The stack related instructions in 8085 microprocessor are :

1. PUSH rp 2. PUSH PSW 3. POP rp

4. POP PSW            5. SPHL   6. XTHL

 

Q.20 Write the machine control instructions of 8085 microprocessor.  

AU : Dec.-08, May-13, June-11

Ans. : Machine control  instructions of 8085 microprocessor are

1. EI 

2. DI

3. NOP      

4. HLT

5. SIM       

6. RIM                 

 

Q.21 How the instruction sets are grouped ?

AU : June-09, Dec.-11

(Refer section 2.2)        

 

Q.22 What are the use of CALL and RET instructions of 8085 ?

AU : Dec-09

(Refer section 2.2.6)

         

Q.23 Mention the instructions used for data transfer with I/O ports.    

AU : May-10

Ans. : The instructions used for data transfer with I/O ports are :

1. IN addr 2. OUT addr

 

Q.24 Differentiate CALL instruction from JUMP instruction.

Ans. :


 

Q.25 What do you understand by the term 'program status word' and state how it can be read ?        

Ans. : Program status word is the flag register of microprocessor. In 8085 microprocessor the program status word can be read as follows :

PUSH PSW

POP rP

Now contents of PSW are available in lower byte of specified register pair.

 

Q.26 What is the value of register A after each of the following instructions ?

MOV A, # 26H,

RR A

RR A

RR A

RR A

SWAP A

Ans : A 26H

 

Q.31  What are the instructions associated with a subrutine ?     

AU : Dec.-13 1

Ans. :          The instructions associated with a subroutine are : CALL and RET.        

 

Q.32  List any two data manipulation instructions.

AU : Dec.-14

(Refer section 2.2.2)     

 

Q.33 State the function of given 8085 instructions : JP, JPE, JPO, JNZ.

AU : May-11      

(Refer section 2.2.6)     

 

Q.34 How is PUSH B instruction executed ? Find the status after the execution.     

AU : May-11

(Refer section 2.2.5)               

 

Q.35 What is the use of branching instructions ? Give example.           

AU : May-12

(Refer section 2.2.6)               

 

Q.36 Mention the similarity and difference between compare and subtract instructions.

AU : May-14

(Refer example 2.6.2)

                  

Q.37 Explain the functioning of CMP instruction.

AU : Dec.-15       

(Refer section 2.2.3)      

                  

Q.38 Define stack and stack related instructions.

AU : May-16

(Refer section 2.2.5)

 

Q.39 Classify the addressing modes of 8085 microprocessor.                

AU : Dec.-16       

(Refer section 2.3)         

 

Q.40 What is the function of the CALL instruction?

AU : Dec.-16

(Refer section 2.2.6)               

 

Q.41 State any four data transfer instructions and their function.                 

(Refer section 2.2.1)

 

Q.42 What is subroutine ?

AU : Dec.-18       

(Refer section 2.2.6)      

 

Q.43 State the advantages of subroutine.

AU : Dec.-19       

Ans. : The advantages of subroutine are :

1. Subroutines make programs shorter as well as easier to read and understand, because they break program code into smaller sections.

2. You can test subroutines separately, rather than having to test the whole program. This makes programs easier to debug.

3. Writing subroutines allow to distribute various tasks in the program amongst different programmers.

4. You can use a subroutine many times in a program; if you wanted to repeat the same set of instructions several times in a program.

5. If something needs to be changed in a subroutine, it only needs to be changed once, within the subroutine code. This change will then take effect wherever in the program the subroutine is used.

6. Data that is passed to a subroutine can be customised, so a subroutine can perform the same action on different data.

7. You can add subroutines to a library so that you can use them in other programs.

 

Q.44 Illustrate the changes made to the ontent of registers during the execution fo the instruction LXI B, 4000 H.

Ans. : BH = 40 H and BL = 00 H

Microprocessors and Microcontrollers: Unit II: (a) 8085 Instruction Set and ALP : Tag: : Microprocessors and Microcontrollers | 8085 Instruction Set and ALP - Two Marks Questions with Answers