os-tutorial
os-tutorial copied to clipboard
Errors in stack section
There are a few things incorrect in the 04-stack section:
- Not just the stack top can be accessed, everywhere in the stack can be accessed.
- The stack top is not 0x7ffe, it's 0x7ffa (where 'C' is stored)
- 0x8000 is the base address of the stack which doesn't contain anything, so it's garbage even before popping anything out of the stack
I have one question
push 'A' push 'B' push 'C'
'A' address is 0xfffe, 'B' address 0xfffc, 'C' address 0xfffa
Why char occupy 2 bytes, shouldn't it be 1 byte?