Why does bios read at partition's boot record at 0000:7c00 ? What is special about that address ? what ':' doing in referencing an address ?
-
1Why 7C00? That would probably best be answered by a BIOS programmer/hardware designer for the initial/original IBM PC BIOS. If you could find a copy of the *IBM Personal Computer Technical Reference manual* it may contain some clues. – Jan 13 '10 at 17:47
4 Answers
The simple answer is that 7C00h is 1k (512 bytes for the boot sector plus an additional 512 bytes for possible boot sector use) from the bottom of the original 32k installed memory.
The happy answer is that org 7C00h
has become synonymous with boot sector - boot loader programming.

- 100,966
- 191
- 140
- 197

- 644
- 6
- 11
-
1
-
1@Mike Gonta: I was looking for such an answer for years, in many documentations and tutorials, with no avail. But your answer is the best and solves the mystery. Thank you very much for that. You gave me the last piece of puzzle which has led me to this link: http://www.glamenv-septzen.net/en/view/6 ... But there is one last mystery for me: Why did they used 55 AA for the boot signature? I suspect that has something to do with the bit patterns they are: 01010101 10101010, but don't know what. Maybe you know? – SasQ Jun 17 '12 at 21:24
The ":" is a holdover from segmented memory days, when PCs ran in real mode and could only do 64K at a time. The number to the left of the ":" is your segment, the number to the right is your address.
The windows debug command accepts this notation if you want to poke around in memory yourself:
C:\Users\Seth> debug
-d0000:7c00
0000:7C00 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0000:7C10 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0000:7C20 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0000:7C30 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0000:7C40 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0000:7C50 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0000:7C60 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0000:7C70 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
With regard to this particular address, it's just an address that was picked to load the MBR, See: https://web.archive.org/web/20140701052540/http://www.ata-atapi.com/hiwmbr.html
"If an MBR is found it is read into memory at location 0000:7c00 and INT 19 jumps to memory location 0000:7c00"

- 45,033
- 10
- 85
- 120
In the original IBM PC it was thought inconceivable to have more than 32K RAM. In segmented addressing terms this is 0000:8000 where 8000 hex is 32768 decimal. The fashion of the time was for the BIOS POST conclude by loading the Boot Sector of the floppy in A: or the Master Boot Record of the hard drive in C: at the location 512 bytes below the top of memory which means subtract 0200 hex from 8000 hex to get 7C00. So the boot sequence loaded the first valid 512 byte first sector into, and then set the Instruction Pointer to 0000:7C00 to execute it. I used to write the code for these first sectors to load the operating system.

- 1,113
- 7
- 13
-
1If you can cite a source for this, this should be the accepted answer. Don't know why the accepted answer is about Windows debug. – Matviy Kotoniy Jan 11 '21 at 05:27
-
1Actually, the original IBM PC was shipped with 16, 32, or 64 kB RAM and the 16k version was for ROM BASIC only (no floppy disks). Even the first mainboards supported upgrades to up to 256 kB memory which wasn't seen as particularly outrageous back in the day. – fuz Feb 15 '21 at 14:57
-
I used this answer by @jlettvin to respond to similar question: https://stackoverflow.com/a/70555759/1025073, and have mentioned possible sources here -- quotes "From Dr. David Bradley", developer from the original IBM BIOS development team: https://en.wikipedia.org/wiki/David_Bradley_(engineer)#Other_accomplishments – saulius2 Jan 02 '22 at 12:06
Read this article:
http://en.wikibooks.org/wiki/X86_Assembly/Bootloaders
From the above URL, BIOS (which is effectively PC hardware) will make the jump to memory at 0000:7c00 to continue execution in 16-bit mode.
And to quote from above:
A bootloader runs under certain conditions that the programmer must appreciate in order to make a successful bootloader. The following pertains to bootloaders initiated by the PC BIOS:
- The first sector of a drive contains its boot loader.
- One sector is 512 bytes — the last two bytes of which must be 0xAA55 (i.e. 0x55 followed by 0xAA), or else the BIOS will treat the drive as unbootable.
- If everything is in order, said first sector will be placed at RAM address 0000:7C00, and the BIOS's role is over as it transfers control to 0000:7C00. (I.e. it JMPs to that address)
So from bootup, if u want the CPU to start executing your code, it has to be located in memory at 0000:7c00. And this part of the code is loaded from the first sector the harddisk - also done by hardware. And it is only the first sector which is loaded, the remaining of other parts of the code then have to be loaded by this initial "bootloader".
More information on harddisk's first sector and the 7c00 design:
http://www.ata-atapi.com/hiwdos.html
http://www.ata-atapi.com/hiwmbr.html
Please don't confuse with the starting up mode of the CPU - the first instruction it will fetch and execute is at physical address 0xfffffff0 (see page 9-5):
and at this stage it is executing non-volatile (meaning you cannot reprogram it easily, and thus not part of bootloader's responsibility) BIOS code.

- 1
- 1

- 6,337
- 4
- 42
- 58