MICROPROCESSOR AND MICROCONTROLLER

INTRODUCTION TO MICROPEOCESSOR

MICRO PROCESSOR AND MICRO CONTROLLER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which register holds the address for a stack whose value is supposed to be directed at the topmost position?
A
Stack Pointer
B
Stack Register
C
Both a & b
D
None of the above
Explanation: 

Detailed explanation-1: -The stack pointer “SP” is the register which holds the address of the top of the stack.

Detailed explanation-2: -On x86, the stack pointer is stored in the register called “rsp” (Register: Stack Pointer). Conceptually, the stack is divided into two areas: high addresses are all in use and reserved (you can’t change these values!), and lower addresses that are unused (free or scratch space).

Detailed explanation-3: -5. In PUSH instruction, after each execution of the instruction, the stack pointer is a) incremented by 1 b) decremented by 1 c) incremented by 2 d) decremented by 2 Answer: d Explanation: The actual current stack-top is always occupied by the previously pushed data.

There is 1 question to complete.