I'm making an operating system for fun, whilist learning more Assembly on the way. I learned about pushing and popping, as I understand, pop takes the value that is on top of any other value on the stack, so it gets the last pushed one. But I wonder, can we actually directly pop the value at the stack base (i.e. the first pushed one)?
Like:
push 'A'
push 'B'
push 'C'
pop bx ; Gets C
Instead of C, I want to get A as an example. (I'm in 16-bit mode, and the assembler is NASM, specified in the tags as well.)