Saturday 11 June 2016

8085 Programming Model



      1. Registers

  • The 8085 has six general purpose registers to store 8 bit data; these are identifies as B, C, D, E, H, L. 
  • They can be combined  as register pairs - BC, DE and HL to perform some 16-bit operations.
  • The programmer can use these registers to store or copy data into the registers by using data copy instructions.

      2. Accumulator
  • The accumulator is an 8-bit register that is a part of arithmetic/logic unit(ALU).
  • This register is used to store 8-bit data and to perform arithmetic and logical operations.
  • The result of an operation is stored in the accumulator.
  • The accumulator is also identified as register A.

      3. Flags

Bit positions of various flags in the flag register of 8085
  • 8085 has five flag registers:-
          - Sign Flag (S): Sets or Resets based on the result stored in the accumulator.
                                    If the result stored is positive, the flag resets else if the result stored is negative                                     the flag is set.

          - Zero Flag (Z): Sets or Resets based on the result stored in the accumulator. 
                                    If the result stored is zero the flag is set else it is reset.

          - Auxiliary Carry Flag(AC) : This flag is set if there is a carry from low nibble(lowest 4 bits) to                                     high nibble(upper 4 bits) or a borrow from high nibble to low nibble, in the                                           low order 8-bit portion of an addition or subtraction operation.

          - Parity Flag (P): This flag is set if there is even parity else it resets.

          - Carry Flag (CY): This flag is set if there is a carry bit else it resets.


      4. Program Counter (PC)
  • This 16-bit register deals with sequencing the execution of instructions this register is a memory pointer.
  • Memory locations have 16 bit addresses and that is why this is a 16 bit register.
  • The function of the PC is to point to the memory address from which the next byte is to be fetched.
  • When a byte(machine code) is being fetched, the program counter is incremented by one to point to the next memory location.

      5. Stack Pointer (SP)
  • The stack pointer is also a 16-bit register used as a memory pointer.
  • It points to a memory location in R/W memory called stack.
  • The beggining of the stack is defined by loading 16-bit address in the stack pointer.

42 comments:

  1. Finally got the desired answer.
    Thank you so much !!!

    ReplyDelete
    Replies
    1. It is so helpful ☺ thank you ๐Ÿ’œ

      Delete
    2. thanks a lot!

      Delete
    3. Very helpful material for me
      Thanku so much

      Delete
    4. Thanks for the help needfull and meaning full answer
      ๐Ÿ˜Š

      Delete
  2. thank you, very helpful

    ReplyDelete
  3. Stack pointer ia not understandable sir...plz explain it in simple way like explained above topics.

    ReplyDelete
    Replies
    1. it is used to do operation on the top of the structured data(stack), example:- suppose you are opening your whatsapp app so it is a structured data and then the top of the chat means the latest chat done by you, when you click on that the address of that instruction(command) will be stored in SP(stac pointer).

      Delete
  4. Diagram bi draw karna hai kya

    ReplyDelete
  5. Thank you a lot

    ReplyDelete
  6. still helpful

    ReplyDelete
  7. THANKS BRUH, I REALLY HELPED , LOOKING FOR A PRECISE ANSWER. AND IT CAN'T BE MORE PRECISE THAN THIS

    ReplyDelete
  8. Thanks Master £

    ReplyDelete
  9. Very nice explanation
    Thanks a lot

    ReplyDelete
  10. Thankyou so much

    ReplyDelete
  11. Sunnyjutt02@gmail.com

    ReplyDelete