The book "Computer Principles" mentions that when the computer boots up, the master boot record will be stored in memory address 0x7C00.

The book did not explain how this strange address came from. I have been puzzled why the master boot record is not stored in the head, tail, or other location of the memory, but is stored in this area which is 1024 bytes smaller than 32KB?

I searched for many articles and books these days and finally solved the mystery.

If you do not know what is the master boot record (abbreviated MBR), you can first view the video tutorial "How Does The Computer Boot Up?".

In short, the computer boot process is as follows:

Power ups.

Read BIOS in ROM to check hardware.

Hardware check completed.

The BIOS checks the first sector of the boot device (that is, the master boot record) according to the specified order, and loads it at the memory address 0x7C00.

The master boot record gives the operate right to the operating system.

Therefore, the master boot record is a small program that boots the “operating system” to load to the memory, and its size does not exceed one sector (512 bytes).

The address 0x7C00 comes from Intel's first-generation personal computer chip 8088, which is used by future CPUs to maintain compatibility.

In August 1981, the IBM PC 5150, IBM’s earliest personal computer, was introduced and used this chip.

At that time, the operating system of this computer was 86-DOS, and the operating system needed at least 32 KB of memory. We know that the memory address is numbered from 0x0000, so the address range of 32KB memory size is 0x0000 to 0x7FFF.

The 8088 chip itself needs to occupy a memory address segment from 0x0000 to 0x03FF to store the locations of interrupt handlers (the master boot record itself is the handler for the interrupt signal INT 19h). Therefore, only 0x0400 to 0x7FFF address segment can be used in memory.

In order to leave more contiguous memory to the operating system, the master boot record is stored at the end of the memory address.

The size of a sector is 512 bytes, and an another 512 bytes of memory is required to save the data generated by the master boot record itself. Therefore, the memory address of the master boot record is as follows:

0x7FFF - 512 - 512 + 1 = 0x7C00

After the computer is started, the usage of 32 KB of memory is as follows: