EET303
Microprocessors and
Microcontrollers
Module II
8085 instruction set overview
8085 instruction set overview . . . contd.
8085 instruction set overview . . . contd.
8085 instruction set overview . . . contd.
8085 instruction set overview . . . contd.
Rotate instructions
Instructions for 16-bit data transfer
RLC
      RAL
RRC and RAR
Instruction summary
Instruction summary
Instruction summary
Instruction summary
                  Carry flag
STC - Setting the carry
CMC - Complementing the carry
Program:
   Clear the carry flag and load FFH in register C.
Add 01H to C. If the carry flag is set, display 01H at
output port 00H , else display the contents of
register C.
Try the same using INR instruction.(CY flag is not
affected.)
                       Stack
•   A portion of memory is designated as stack.
•   Operates on LIFO principle.
•   Beginning of stack is defined by instruction LXI SP,
•   Storing of data begins at address 1 less than content of
    SP.
•   Stack grows in the opposite direction to data storage.
•   Size is limited only by the availability of memory.
•   PUSH and POP instructions are used.
•   2 bytes from register pairs are stored and retrieved every
    time.
•   SP is always incremented/decremented by TWO.
Instructions involving stack
                 Subroutine
• Similar to a function - avoids repetition of code
• CALL and RET instructions are used
Conditional CALL and RETURN instructions
           Delay subroutines
• Delay routines are subroutines used for
  maintaining the timings of various operations in
  microprocessor.
• In control applications, certain equipment needs
  to be ON/OFF after a specified time delay.
• In some applications, a certain operation has to
  be repeated after a specified time interval.
           Delay subroutines
• The delay time is given by the total time taken to
  execute the delay subroutine.
• It can be computed by multiplying the total
  number of T-states required to execute
  subroutine and the time for one T-state of the
  processor.
• The total number of T-states can be computed
  from the knowledge of T-states required for each
  instruction.
• The time for one T-state of the processor is
  given by the time period of the system clock.
Nesting of subroutines