6
votes

from Wikipedia

On an IBM PC compatible machine, the BIOS selects a boot device, then copies the first sector from the device (which may be a MBR, VBR or any executable code), into physical memory at memory address 0x7C00

I'm reading about the booting process in operating system especially the intel x86 : so what I have found is that BIOS loads the first 512 bytes of the bootloader to the memory location

(segment, offset) = (0x0000,0x7C00) = 0x07C00

and jumps to there to execute the bootloader

my qustion is why BIOS always loads the

bootloader to 0x07C00?

1
That's the legacy-BIOS boot method. Modern PCs normally boot in EFI mode, so the first code they load+run that wasn't part of the firmware itself is run in protected mode or 64-bit mode, not in a 16-bit environment that undoes a lot of setup the BIOS did first (for its own internal 64-bit code). See wiki.osdev.org/UEFI. Modern PCs do still have a legacy boot mode, so you can boot legacy BIOS boot sectors, but learning about it is becoming less and less relevant. (except maybe as a learning exercise once you already know some asm in general). - Peter Cordes

1 Answers

6
votes

The reason why BIOS always loads the bootloader to 0x07C00 is historical.

In the early days, a PC is only guaranteed to have 64 KB of RAM memory.

The memory below 0x07C00 is reserved for interrupt vectors, BIOS and BASIC, etc.

The first OS usable memory begins at 0x08000.

So the bootloader is loaded to 0x07C00, which is 1 KB below 0x08000.