Stack Pointer and Register B

Posted on at


Stack Pointer

  • Stack pointer is a 8 bit register with address 81H.
  • It pointes the address of current stack memory location.
  • While pushing data into stack memory stack pointer is incremented by 1.
  • If data is retrieved from stack memory stack pointer is decremented by 1.
  •  Designer can stack pointer register from first memory location of stack memory by inserting address of first location of stack memory.

 

MOV SP, # 5FH

  • In 8051 stack memory is of 32 byte with starting address of 5FH and ending address of 7FH.

 

Register B:

  • This is 8 bit register.
  • Used with accumulator in the process of multiplication and division.
  • In case of multiplication 8 bit output is stored in accumulator while upper 8 bits are stored in register.
  • In division result is stored accumulator while remainder is stored in register B.


About the author

saimazahoor

this is me,the cutest and the most charming saima zahoor

Subscribe 0
160