Page 3 of 3

Re: [Solved] OS crashes on paging enable

Posted: Sun Jun 04, 2017 9:53 am
by iocoder
BluCode wrote:It turns out that I didn't set esp and ebp in pm, just sp and bp in real mode. I set them in pm and now all is well, although ebp is slightly lower than I set it to, which is weird. (0x7bf3 instead of 0x7bff).
GCC alters the value of EBP during runtime:

What is the use of “push %ebp; movl %esp, %ebp” generated by GCC for x86?

Re: [Solved] OS crashes on paging enable

Posted: Sun Jun 04, 2017 10:05 am
by BluCode
I see, that explains it. Thanks for all your help with this.