os-tutorial icon indicating copy to clipboard operation
os-tutorial copied to clipboard

Errors in stack section

Open pzhzqt opened this issue 6 years ago • 1 comments

There are a few things incorrect in the 04-stack section:

  1. Not just the stack top can be accessed, everywhere in the stack can be accessed.
  2. The stack top is not 0x7ffe, it's 0x7ffa (where 'C' is stored)
  3. 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

pzhzqt avatar Jul 26 '19 14:07 pzhzqt

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?

young-lee-young avatar Sep 09 '22 03:09 young-lee-young