Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Why do PCs load their boot sector at 7C000h linear? (glamenv-septzen.net)
73 points by monopolemagnet on Sept 26, 2015 | hide | past | favorite | 26 comments


I feel old for recognising that address and knowing the answer to the question before I even read the article...

You can see the actual bootloader code in the PC's BIOS here:

http://static.pcjs.org/pubs/pc/reference/ibm/5150/techref/19...

The address is mentioned in lines 44 and 45 here:

http://static.pcjs.org/pubs/pc/reference/ibm/5150/techref/19...

(It would be so very awesome if this was the sort of documentation you got if you purchased a new computer, although perhaps on a disc instead of hardcopy.)


I love this kind of software archeology. I think I first came across this term in Vernor Vinge's book "A Deepness in the Sky".


I'm not sure which Zones Of Thought book it was (probably Deepness in the Sky), but my favorite software joke in SciFi is when someone deep-diving into the system discovers that at the deepest layers timekeeping is still calculated from the UNIX epoch on the long lost human homeworld.


Reminds me of this: http://abstrusegoose.com/323


I wouldn‘t call it software archeology because it is still very much in use and modern standard.


It is 7C00h linear.


Yeah, it's not 7C00:0000, it's 007C:0000 (or 0000:7C00)

shudders


07C0:0, actually :)


True, too bad I can't fix in the original comment

"The 16-bit segment selector in the segment register is interpreted as the most significant 16 bits of a linear 20-bit address"

However, Wikipedia has a funny quote on that

"Once the BIOS has found a bootable device it loads the boot sector to linear address 7C00h (usually segment:offset 0000h:7C00h, but some BIOSes erroneously use 07C0h:0000h"

https://en.wikipedia.org/wiki/Booting#BOOT-LOADER


Can someone provide a TL;DR? I'm finding it very hard to understand the article.


IBM's BIOS put the boot loader at the end of the minimum amount of memory at the time (32KB). 7C00-7DFF get the boot sector, and 7E00-7FFF are scratch space.

Also once upon a time SCP tucked it into 0200-03FF because that ram was otherwise unused.


the minimum was 16KB I think (they used 4116s).


Well, I'm just summarizing.

> "DOS 1.0 required a minimum of 32KB, so we weren't concerned about attempting a boot in 16KB."

> (Note: DOS 1.0 required 16KiB minimum ? or 32KiB ? I couldn't find out which correct. But, at least, in 1981's early BIOS development, they supposed that 32KiB is DOS minimum requirements.)


There are different configs of IBM PC, the cheapest which relied on the ROM BASIC and cassette tape.


Right, but we're worried here about the ones booting DOS, while they were designing this.


So it was the same guy who came up with Ctrl+Alt+Del.



Do you intentionally leave out parens in the #define for MODULE_SIZE?

If it was used in a context with higher precedence than multiplication, it'd be a bug.


TerryADavis might have something meaningful to say here if given the chance. Can YC selectively un-auto-[dead] people?



And today I learn about Terry Davis, TempleOS and showdead. Moderation and censorship is a travesty online. Fortunately showdead allows us to bypass it somewhat.


There's a distinction between going out and censoring people, and not letting them post anything they want on your domain.


No there is not.


I'll book a trip to your house and write on your walls, then.


I have kids. I'm already there.


Soon the community will be able to selectively un-auto-[dead] comments. We've been working on this for a long time. It's currently in alpha testing, and indeed the alpha-testers (not moderators) unkilled https://news.ycombinator.com/item?id=10282575, which is precisely the intent of the feature.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: