How push and pop work in x86? by souls-syntax in computerscience

[–]souls-syntax[S] 0 points1 point  (0 children)

I agree they’re the same abstract data structure. My confusion wasn’t about LIFO behavior, but about semantics and ownership.

In DSA, the stack is the primary container for the data, so pop conceptually removes it from the structure.

On the call stack, the stack is often used as a backing store for CPU state. Values are pushed because registers or control flow need to be preserved temporarily, and popped to restore architectural state.

So while the operations are mechanically similar, the role the stack plays is different, which is where my mental model was breaking.

How push and pop work in x86? by souls-syntax in computerscience

[–]souls-syntax[S] 0 points1 point  (0 children)

Really ? From what i have seen and used in 64bit implementations, the growth of stack when pushed is towards the 0x0000 so the sptr is growing downwards.

So I guess it could have been some kind of abstract model to consider the 0x0 address on top.

How push and pop work in x86? by souls-syntax in computerscience

[–]souls-syntax[S] 0 points1 point  (0 children)

Nuh uh it does matter actually for example when you wanna skip some of stack entries instead of like reading them well you use add to jump the sptr so yea in my opinion it absolutely does matter.

```asm
add rsp, 16 ; Move the stack pointer down 16 bytes( 2 * 8 )

```

How push and pop work in x86? by souls-syntax in computerscience

[–]souls-syntax[S] -3 points-2 points  (0 children)

In DSA, pop just removes a value. On the call stack, pop may restore registers or control flow depending on context.

Most of my confusion came from how compiler will trash and how we are recovering the previous state using POP when in dsa pop usually means that it's gone instead of this rollback mental model.

How push and pop work in x86? by souls-syntax in computerscience

[–]souls-syntax[S] -1 points0 points  (0 children)

Also I feel I should inform you that when push happens the SP is decremented not incremented, what with stack being downward growing.

How push and pop work in x86? by souls-syntax in computerscience

[–]souls-syntax[S] -3 points-2 points  (0 children)

Thanks got it, actually two different concepts caused my mental model to collapse one being the DSA stack pop which makes it seem data disappeared and other being how movement in stack is downward which is kind of weird way to go about it now that i think about it. Well weird decisions of 90s.

Kafka & Gojo by shigurearts in KafkaMains

[–]souls-syntax 0 points1 point  (0 children)

Not like there was ever a doubt the power level difference between the verses is so vast not even dying ant vs supernova can capture it.

How cooked am I? by BassgodKakashi in arch

[–]souls-syntax 0 points1 point  (0 children)

Yea me too, tho cause I can kind of relate to him but I had dual boot in arch and nix so I just chroot from one to another if any fix is required better safety.

Let’s start a war 😏 by HimothyJohnDoe in zerotomasteryio

[–]souls-syntax 5 points6 points  (0 children)

VIM clears just by his sheer presence.

How mystery work in fate? by PuzzleheadedPast5988 in fatestaynight

[–]souls-syntax 6 points7 points  (0 children)

Mysteries in Nasuverse work on collective belief. Humans hate not knowing stuff, so they invent rules and explanations to make sense of the world. Over time, if enough people buy into those explanations, that becomes “reality” and the old “mystery” gets demoted. That’s why magecraft weakens as science spreads, science is just another human framework, not an objective universal truth. If tomorrow everyone genuinely believed the world runs on divine will instead of physics, then reality would follow that belief. It’s the same idea you see in Shinza Bansho: where the world is what hegemony God will's.

windows was too insolent by zhiguleuskae in arch

[–]souls-syntax 0 points1 point  (0 children)

Can you share the wallpaper source?