[solved]Why can't I load the second sector to memory?

Programming, for all ages and all languages.
prasadjvv
Posts: 5
Joined: Thu Jan 06, 2011 9:48 am

Re: [solved]Why can't I load the second sector to memory?

Post by prasadjvv »

shedokan wrote:
quok wrote:When you change the SS segment, interrupts are automatically disabled until after the next instruction. So it would be wise to immediately load SP/ESP next and not ES. :)
so why grub does it?
Check the post by Brendan for the topic with subject "[help] 1st bootloader".
I am reproducing part of it here.
Brendan wrote: if you're assuming 80386 or later (but not if you're assuming it could be 8086 or something) then you could remove the "cli" and "sti", as 80386 and later CPUs automatically supress IRQs for one instruction after a "mov ss"
Assuming it is true for 80386 and later processors, Grub might have been targetted for CPUs prior to 80386 also.
shedokan
Posts: 22
Joined: Sat Jan 08, 2011 9:42 am

Re: [solved]Why can't I load the second sector to memory?

Post by shedokan »

prasadjvv wrote:
shedokan wrote:
quok wrote:When you change the SS segment, interrupts are automatically disabled until after the next instruction. So it would be wise to immediately load SP/ESP next and not ES. :)
so why grub does it?
Check the post by Brendan for the topic with subject "[help] 1st bootloader".
I am reproducing part of it here.
Brendan wrote: if you're assuming 80386 or later (but not if you're assuming it could be 8086 or something) then you could remove the "cli" and "sti", as 80386 and later CPUs automatically supress IRQs for one instruction after a "mov ss"
Assuming it is true for 80386 and later processors, Grub might have been targetted for CPUs prior to 80386 also.
Ok, thanks all of you!
Post Reply