title: On reset what happens in embedded system?
body: <p>I have a doubt regarding the reset due to power up:</p>
  
  <p>1.As i know that microcontroller is hardwired to start with some particular memory location say 0000H on power up. At 0000h, whether interrupt service routine is written for reset(intialization of stack pointer and program counter etc) or the reset address is there at 0000h(say 7000) so that micro controller jumps at 7000 address and there initialization of stack and PC is written.</p>
  
  <p>2.Who writes this reset service routine? Is it the manufacturer of microcontroller chip(Intel or microchip etc) or any programmer can change this reset service routine(For example, programmer changed the PC to 4000h from 7000h on power up reset resulting into the first instruction to be fetched from 4000 instead of 7000).</p>
  
  <p>3.how the stack pointer and program counter are initialized to the respective inital addresses as on power up microcontroller is not in the state to put the address into stack pointer and program counter registers(there is no intialization done till reset service routine). </p>
  
  <ol>
  <li>What should be the steps in the reset service routine considering all possibilities?</li>
  </ol>
  
  <p>Thanks in advance</p>