title: What is the value of stack pointer?
body: <p>Consider a processor with byte-addressable memory. Assume that all registers, including Program Counter (PC) and Program Status Word (PSW), are of size 2 bytes. A stack in the main memory is implemented from memory location (0100)hex and it grows upward. The stack pointer (SP) points to the top element of the stack. The current value of SP is (016E)hex. The CALL instruction is of two words, the first word is the op-code and second word is the starting address of the subroutine 
  (one word = 2 Bytes). The CALL instruction is implemented as follows:</p>
  
  <ol>
  <li>Store the current value of PC in the Stack</li>
  <li>Store the value of PSW register in the stack</li>
  <li>Load the starting address of the subroutine in PC</li>
  </ol>
  
  <p>The content of PC just before the fetch of a CALL instruction is (5FA0)hex. After execution of the CALL instruction, the value of the stack pointer is </p>
  
  <p>A. 016A</p>
  
  <p>B. 016C</p>
  
  <p>C. 0170</p>
  
  <p>D. 0172</p>
  
  <p>This question was asked in GATE 2015 Computer science.</p>
  
  <p>I marked D as answer please help me to verify my answer, because I am not sure whether I have done it right or not.</p>
  
  <p>Thanks in Advance.</p>