Posts

Showing posts from January, 2022

8085 Microprocessor Questions

  8085 Microprocessor Questions 1. What are the various registers in 8085? Answer - Accumulator register, Temporary register, Instruction register, Stack Pointer, Program Counter are the various registers in 8085. 2. In 8085 name the 16-bit registers? Answer - Stack pointer and Program counter all have 16 bits. 3. What are the various flags used in 8085? Answer - Sign flag, Zero flag, Auxiliary flag, Parity flag, Carry flag. 4. What is Stack Pointer? Answer - Stack pointer is a special purpose 16-bit register in the Microprocessor, which holds the address of the top of the stack. 5. What is a Program counter? Answer - Program counter holds the address of either the first byte of the next instruction to be fetched for execution or the address of the next byte of a multi-byte instruction, which has not been completely fetched. In both cases, it gets incremented automatically one by one as the instruction bytes get fetched. Also Program register keeps the addr...

Restart instructions (RSTn)

Image
  Restart instructions (RSTn) in 8085 Microprocessor In the 8085 Instruction set, RSTn is actually standing for “Restart n”. And in this case, n has a value from 0 to 7 only. Thus the eight possible RST instructions are there, e.g. RST 0, RST 1, …, RST 7. They are 1-Byte call instructions. Functionally RST n instruction is similar with: RST n = CALL n*8 For example, let us consider RST 4 is functionally equivalent to CALL 4*8, i.e. CALL 32 = CALL 0020H. The advantage of RST 2 is that it is only 1 Byte, whereas CALL 0010H is 3-Byte long. Thus RST instructions are useful for branching to frequently used subroutines. In the above table, it has been shown that if we analyze the RSTn Hex Codes then we are finding that the middlemost 3-bits are denoting the value for n (As highlighted in the table). And the other5 bits in the Byte provide the code for RST. Let us consider, RST 4 as an example instruction of this type. It is a 1-Byte instruction. It is functionall...