PROGRAMMING OF 8085 PROCESSOR
1. What is an instruction?
An instruction is a binary pattern entered through an input device to command the microprocessor to perform that specific function.
2. How many operations are there in the instruction set of 8085 microprocessor?
There are 74 operations in the 8085 microprocessor
3. 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.
4. 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.
5. 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.
6. 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.
7. 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)
8. 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
9. 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
10. 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
11. 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
12. 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
13. 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
14. Compare CALL and PUSH instructions
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
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
15. 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.
16. Compare RET and POP
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 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
17. 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.
18. 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.
19. 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
20. Define stack?
Stack is a sequence of RAM memory locations defined by the programmer.
21. 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.
22. 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.
Copyright © 2018-2020 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.