Artur Grigio
Artur Grigio

Reputation: 5553

Where in the CPU is the Assembly Stack located?

I'm studying assembly with this image: View of CPU components (compliments of UCI)

In Assembly you'll use the stack with commands like:

push EAX
pop EBP
sub esp, 4
...

Where is this stack exactly? From the picture, the only place it could be is the Memory, but surely that's not the case, right? Won't that slow down the entire cycle?

Upvotes: 0

Views: 723

Answers (1)

David Hoelzer
David Hoelzer

Reputation: 16379

It's not in the CPU. The stack is, in fact, in memory. The stack pointer, however, is a register in the CPU that holds the address of the top of the stack.

Upvotes: 4

Related Questions